Versions in this module Expand all Collapse all v0 v0.18.0 Oct 24, 2023 Changes in this version + const AddToken + const CloseNode + const OpenNode + var Nil = Node + type Builder struct + func (b *Builder) Pop() + func (b *Builder) Push(k Kind) Node + func (b *Builder) PushToken(k Kind, begin int, end int) Node + func (b *Builder) SetName(name string) + type Kind int32 + const Add + const AddressKeyword + const AllKeyword + const AltKeyword + const AltStmt + const Altstep + const AltstepKeyword + const AltstepType + const And4bKeyword + const AndKeyword + const Any + const AnyKeyword + const ArrayDef + const Arrow + const Assign + const AssignStmt + const AtDefault + const AtLocal + const BasicBlock + const BinaryExpr + const Bitstring + const Block + const CallExpr + const CaseKeyword + const CatchKeyword + const CharstringKeyword + const Class + const ClassKeyword + const Colon + const ColonColon + const Comma + const Comment + const Component + const ComponentKeyword + const Concat + const ConfigSpec + const Configuration + const ConfigurationKeyword + const ConnectKeyword + const ConstKeyword + const Constructor + const Control + const ControlKeyword + const CreateKeyword + const Decl + const Declarator + const Destructor + const DisplayKeyword + const Div + const DoKeyword + const DoStmt + const Dot + const DotDot + const DotExpr + const DoubleArrow + const EOF + const ElseKeyword + const EncodeKeyword + const Enum + const EnumLabel + const EnumeratedKeyword + const Equal + const ErrorLiteral + const ExceptKeyword + const ExceptSpec + const ExceptStmt + const Exception + const ExceptionKeyword + const Exclude + const ExecuteKeyword + const Expr + const Exprs + const Extends + const ExtendsKeyword + const ExtensionKeyword + const ExternalKeyword + const FailLiteral + const FalseLiteral + const FinallyKeyword + const Float + const ForKeyword + const ForStmt + const FormalPar + const FormalPars + const FormalTypePar + const FormalTypePars + const Friend + const FriendKeyword + const FromKeyword + const Function + const FunctionKeyword + const FunctionType + const GotoKeyword + const GotoStmt + const Greater + const GreaterEqual + const Group + const GroupKeyword + const GuardStmt + const Identifier + const IfKeyword + const IfStmt + const Import + const ImportKeyword + const ImportKind + const ImportSpec + const ImportStmt + const InKeyword + const InconcLiteral + const IndexExpr + const InoutKeyword + const Integer + const InterleaveKeyword + const LabelKeyword + const LabelStmt + const Language + const LanguageKeyword + const LeftBrace + const LeftBracket + const LeftParen + const LengthKeyword + const Less + const LessEqual + const List + const ListKind + const Literal + const Malformed + const Map + const MapKeyword + const MessageKeyword + const ModKeyword + const Modifier + const ModifiesKeyword + const Module + const ModuleKeyword + const ModuleparKeyword + const MtcKeyword + const Mul + const Name + const NestedEnum + const NestedList + const NestedStruct + const NestedTemplate + const NestedType + const NoblockKeyword + const NoneLiteral + const Not4bKeyword + const NotANumber + const NotEqual + const NotKeyword + const NullKeyword + const OfKeyword + const OmitKeyword + const OnKeyword + const OptionalKeyword + const Or4bKeyword + const OrKeyword + const OutKeyword + const OverrideKeyword + const ParamKeyword + const PassLiteral + const Port + const PortAttribute + const PortDecl + const PortElement + const PortKeyword + const PortKind + const PortSpec + const PortTranslation + const Preproc + const PresentKeyword + const PrimaryExpr + const PrivateKeyword + const ProcedureKeyword + const PublicKeyword + const RealtimeKeyword + const RecordKeyword + const Ref + const Refs + const RemKeyword + const Return + const ReturnKeyword + const ReturnStmt + const RightBrace + const RightBracket + const RightParen + const Root + const RotateLeft + const RotateRight + const RunsKeyword + const SelectKeyword + const SelectStmt + const SelfKeyword + const Semicolon + const SetKeyword + const ShiftLeft + const ShiftRight + const Signature + const SignatureKeyword + const Stmt + const StreamKeyword + const String + const Struct + const StructKind + const StructMember + const Sub + const SubType + const SyntaxError + const SystemKeyword + const Template + const TemplateKeyword + const TemplateRestriction + const Testcase + const TestcaseKeyword + const TestcaseType + const ThisKeyword + const TimerDecl + const TimerKeyword + const ToKeyword + const TrueLiteral + const TypeKeyword + const TypePar + const TypePars + const UnaryExpr + const UnionKeyword + const UniversalKeyword + const Unknown + const UnmapKeyword + const Unterminated + const ValueKeyword + const VarDecl + const VarKeyword + const VariantKeyword + const Visibility + const WhileKeyword + const WhileStmt + const With + const WithKeyword + const WithKind + const WithQualifier + const WithStmt + const Xor4bKeyword + const XorKeyword + func (k Kind) IsKeyword() bool + func (k Kind) IsLiteral() bool + func (k Kind) IsNonTerminal() bool + func (k Kind) IsTerminal() bool + func (k Kind) IsToken() bool + func (k Kind) IsTrivia() bool + func (k Kind) String() string + type Node struct + func Parse(src []byte) Node + func Tokenize(src []byte) Node + func (n Node) End() int + func (n Node) Err() error + func (n Node) FindDescendant(pos int) Node + func (n Node) FirstChild() Node + func (n Node) FirstToken() Node + func (n Node) Inspect(f func(n Node) bool) + func (n Node) IsNonTerminal() bool + func (n Node) IsTerminal() bool + func (n Node) IsToken() bool + func (n Node) IsValid() bool + func (n Node) Kind() Kind + func (n Node) LastToken() Node + func (n Node) Len() int + func (n Node) Next() Node + func (n Node) Parent() Node + func (n Node) Pos() int + func (n Node) Span() Span + func (n Node) Text() string + type NodeError struct + Err error + Hint string + func (e *NodeError) Error() string + func (e *NodeError) Unwrap() error + type Position struct + Column int + Line int + func (pos *Position) After(other Position) bool + func (pos *Position) Before(other Position) bool + func (pos *Position) IsValid() bool + func (pos *Position) String() string + type Scanner struct + func NewScanner(src []byte) *Scanner + func (s *Scanner) Lines() []int + func (s *Scanner) Scan() (Kind, int, int) + type Span struct + Begin Position + End Position + Filename string + func (s Span) String() string