Documentation ¶
Index ¶
- Variables
- func EmbeddedTypeDecl(kind EmbeddedTypeKind, name string) *astcore.Decl
- func IsManifestConstant(w string) bool
- type AddOpTerm
- type AddOpTerms
- type Address
- type ArrayType
- type AssemblerStatement
- type AssignStatement
- type Block
- type BlockBody
- type CallStatement
- type CaseLabel
- type CaseLabels
- type CaseSelector
- type CaseSelectors
- type CaseStmt
- type ClassField
- type ClassFieldList
- type ClassHeritage
- type ClassMemberSection
- type ClassMemberSections
- type ClassMethod
- type ClassMethodDirective
- type ClassMethodDirectiveList
- type ClassMethodHeading
- type ClassMethodList
- type ClassProperty
- type ClassPropertyList
- type ClassRefType
- type ClassType
- type ClassVisibility
- type CompoundStmt
- type ConditionalStmt
- type ConstExpr
- type ConstExprs
- type ConstSection
- type ConstantDecl
- type ConstructorHeading
- type CustomClassRefType
- type CustomClassType
- func (m *CustomClassType) Children() Nodes
- func (m *CustomClassType) FindMemberDecl(name string, includePrivate bool) *astcore.Decl
- func (m *CustomClassType) FindProperty(name string, acendant bool) *ClassProperty
- func (m *CustomClassType) GetParentClass() *CustomClassType
- func (*CustomClassType) IsClassType() bool
- type CustomInterfaceType
- type CustomObjectType
- type CustomPointerType
- type DeclSection
- type DeclSections
- type Designator
- type DesignatorFactor
- type DesignatorItem
- type DesignatorItemDereference
- type DesignatorItemExprList
- type DesignatorItemIdent
- type DesignatorItems
- type DesignatorStatement
- type DestructorHeading
- type Directive
- type EmbeddedTypeKind
- type EnumeratedType
- type EnumeratedTypeElement
- type ExceptionBlock
- type ExceptionBlockHandler
- type ExceptionBlockHandlerDecl
- type ExceptionBlockHandlers
- type ExportedHeading
- type ExportsItem
- type ExportsStmt
- type ExportsStmts
- type ExprList
- type Expression
- type ExternalOptions
- type Factor
- type FieldDecl
- type FieldDecls
- type FieldList
- type FileType
- type FixedStringType
- type ForStmt
- type FormalParameters
- type FormalParm
- type FormalParmOption
- type ForwardDeclaration
- type ForwardDeclaredClassType
- type FunctionDecl
- type FunctionHeading
- type FunctionType
- type Goal
- type GotoStatement
- type Ident
- type IdentList
- type IdentRef
- type IfStmt
- type ImplementationSection
- type InheritedStatement
- type InitSection
- type InterfaceDecl
- type InterfaceDecls
- type InterfaceGuid
- type InterfaceHeritage
- type InterfaceMember
- type InterfaceMemberList
- type InterfaceMethod
- type InterfaceMethodDirective
- type InterfaceMethodDirectives
- type InterfaceMethodHeading
- type InterfaceProperty
- type InterfaceSection
- type InterfaceType
- type LabelDeclSection
- type LabelId
- type Location
- type LoopStmt
- type MulOpFactor
- type MulOpFactors
- type Namespace
- type Nil
- type Node
- type Nodes
- type Not
- type NumberFactor
- type ObjectType
- type OrdIdent
- type OrdinalType
- type Parameter
- type ParameterType
- type Parentheses
- type PointerType
- type PortabilityDirective
- type Position
- type ProcedureDeclSection
- type ProcedureType
- type Program
- type ProgramBlock
- type PropertyDefaultSpecifier
- type PropertyInterface
- type PropertyStoredSpecifier
- type QualId
- type QualIds
- type RaiseStmt
- type RealType
- type RecType
- type RecVariant
- type RecVariants
- type RelOpSimpleExpression
- type RelOpSimpleExpressions
- type RepeatStmt
- type SetConstructor
- type SetElement
- type SetType
- type SimpleExpression
- type SimpleStatement
- type SimpleType
- type Statement
- type StatementBody
- type StmtList
- type StringFactor
- type StringType
- type StrucType
- type StructStmt
- type SubrangeType
- type Term
- type ThreadVarDecl
- type ThreadVarSection
- type TryExceptStmt
- type TryFinallyStmt
- type TryStmt
- type Type
- type TypeCast
- type TypeDecl
- type TypeEmbedded
- func (m *TypeEmbedded) Children() Nodes
- func (m *TypeEmbedded) IsOrdIdent() bool
- func (m *TypeEmbedded) IsOrdinalType() bool
- func (m *TypeEmbedded) IsPointerType() bool
- func (m *TypeEmbedded) IsRealType() bool
- func (m *TypeEmbedded) IsSimpleType() bool
- func (m *TypeEmbedded) IsStringType() bool
- func (m *TypeEmbedded) IsVariantType() bool
- type TypeId
- func NewEmbeddedPointerType(v *Ident) *TypeId
- func NewOrdIdent(ident *Ident) *TypeId
- func NewPointerType(ident *Ident) *TypeId
- func NewRealType(ident *Ident) *TypeId
- func NewStringType(ident *Ident) *TypeId
- func NewTypeId(unitIdOrIdent interface{}, args ...interface{}) *TypeId
- func NewVariantType(v *Ident) *TypeId
- type TypeSection
- type Unit
- type UnitId
- type Units
- type UsesClause
- type UsesClauseItem
- type ValueFactor
- type VarDecl
- type VarDeclAbsolute
- type VarDeclAbsoluteConstExpr
- type VarDeclAbsoluteIdent
- type VarSection
- type VariantSection
- type VariantType
- type WhileStmt
- type WithStmt
Constants ¶
This section is empty.
Variables ¶
var ( NewIdent = astcore.NewIdent NewIdentRef = astcore.NewIdentRef NewIdentFrom = astcore.NewIdentFrom NewIdentList = astcore.NewIdentList NewLocation = astcore.NewLocation )
var ( EmbeddedReal48 = newEmbeddedTypeDecl(EtkReal, "Real48") EmbeddedReal = newEmbeddedTypeDecl(EtkReal, "Real") EmbeddedSingile = newEmbeddedTypeDecl(EtkReal, "Single") EmbeddedDouble = newEmbeddedTypeDecl(EtkReal, "Double") EmbeddedExtended = newEmbeddedTypeDecl(EtkReal, "Extended") EmbeddedCurrency = newEmbeddedTypeDecl(EtkReal, "Currency") EmbeddedComp = newEmbeddedTypeDecl(EtkReal, "Comp") EmbeddedInteger = newEmbeddedTypeDecl(EtkOrdIdent, "Integer") EmbeddedCardinal = newEmbeddedTypeDecl(EtkOrdIdent, "Cardinal") EmbeddedShortInt = newEmbeddedTypeDecl(EtkOrdIdent, "ShortInt") EmbeddedSmallInt = newEmbeddedTypeDecl(EtkOrdIdent, "SmallInt") EmbeddedLongInt = newEmbeddedTypeDecl(EtkOrdIdent, "LongInt") EmbeddedInt64 = newEmbeddedTypeDecl(EtkOrdIdent, "Int64") EmbeddedByte = newEmbeddedTypeDecl(EtkOrdIdent, "Byte") EmbeddedWord = newEmbeddedTypeDecl(EtkOrdIdent, "Word") EmbeddedLongWord = newEmbeddedTypeDecl(EtkOrdIdent, "LongWord") EmbeddedChar = newEmbeddedTypeDecl(EtkOrdIdent, "Char") EmbeddedAnsiChar = newEmbeddedTypeDecl(EtkOrdIdent, "AnsiChar") EmbeddedWideChar = newEmbeddedTypeDecl(EtkOrdIdent, "WideChar") EmbeddedBoolean = newEmbeddedTypeDecl(EtkOrdIdent, "Boolean") EmbeddedString = newEmbeddedTypeDecl(EtkStringType, "String") EmbeddedAnsiString = newEmbeddedTypeDecl(EtkStringType, "AnsiString") EmbeddedWideString = newEmbeddedTypeDecl(EtkStringType, "WideString") EmbeddedPointer = newEmbeddedTypeDecl(EtkPointerType, "Pointer") EmbeddedPChar = newEmbeddedTypeDecl(EtkPointerType, "PChar") EmbeddedPAnsiChar = newEmbeddedTypeDecl(EtkPointerType, "PAnsiChar") EmbeddedPWideChar = newEmbeddedTypeDecl(EtkPointerType, "PWideChar") EmbeddedVariant = newEmbeddedTypeDecl(EtkVariantType, "Variant") EmbeddedOleVariant = newEmbeddedTypeDecl(EtkVariantType, "OleVariant") )
var ClassMethodDirectives = ClassMethodDirectiveList{ CmdAbstract, CmdVirtual, CmdOverride, CmdOverload, CmdReintroduce, }
var EmbeddedTypeDeclMap = &embeddedTypeDeclMapSingleton{}
Functions ¶
func EmbeddedTypeDecl ¶
func EmbeddedTypeDecl(kind EmbeddedTypeKind, name string) *astcore.Decl
func IsManifestConstant ¶
Types ¶
type AddOpTerms ¶
type AddOpTerms []*AddOpTerm
func (AddOpTerms) Children ¶
func (s AddOpTerms) Children() Nodes
type Address ¶
type Address struct {
*Designator
}
type ArrayType ¶
type ArrayType struct { IndexTypes []OrdinalType BaseType Type Packed bool }
- ArrayType ``` ARRAY ['[' OrdinalType ','... ']'] OF Type PortabilityDirective ```
type AssemblerStatement ¶
type AssemblerStatement struct { }
- AssemblerStatement ``` ASM <assemblylanguage> END ```
func (*AssemblerStatement) Children ¶
func (*AssemblerStatement) Children() Nodes
type AssignStatement ¶
type AssignStatement struct { Designator *Designator Expression *Expression }
(AssignStatement) ``` Designator ':=' Expression ```
func (*AssignStatement) Children ¶
func (m *AssignStatement) Children() Nodes
type Block ¶
type Block struct { DeclSections DeclSections ExportsStmts1 ExportsStmts Body BlockBody ExportsStmts2 ExportsStmts }
- Block ``` DeclSection ExportsStmt... BlockBody ExportsStmt... ```
- BlockBody ``` CompoundStmt ``` ``` AssemberStatement ```
type BlockBody ¶
type BlockBody interface { StructStmt // extends StructsStmt // contains filtered or unexported methods }
BlockBody is CompoundStmt or AssemblerStatement
type CallStatement ¶
type CallStatement struct { Designator *Designator ExprList ExprList // nil able }
(CallStatement) ``` Designator ['(' ExprList ')'] ```
func (*CallStatement) Children ¶
func (m *CallStatement) Children() Nodes
type CaseLabel ¶
func NewCaseLabel ¶
type CaseLabels ¶
type CaseLabels []*CaseLabel
func (CaseLabels) Children ¶
func (s CaseLabels) Children() Nodes
type CaseSelector ¶
type CaseSelector struct { Labels CaseLabels Statement *Statement }
- CaseSelector ``` CaseLabel ','... ':' Statement ```
func (*CaseSelector) Children ¶
func (m *CaseSelector) Children() Nodes
type CaseSelectors ¶
type CaseSelectors []*CaseSelector
func (CaseSelectors) Children ¶
func (s CaseSelectors) Children() Nodes
type CaseStmt ¶
type CaseStmt struct { Expression *Expression Selectors CaseSelectors Else StmtList }
type ClassField ¶
- ClassField ``` IdentList ':' Type ```
func (*ClassField) Children ¶
func (m *ClassField) Children() Nodes
func (*ClassField) ToDeclarations ¶
func (m *ClassField) ToDeclarations() astcore.Decls
type ClassFieldList ¶
type ClassFieldList []*ClassField
- ClassFieldList ``` (ClassField) ';'... ```
func (ClassFieldList) Children ¶
func (s ClassFieldList) Children() Nodes
type ClassHeritage ¶
type ClassHeritage []*TypeId
- ClassHeritage ``` '(' TypeId ',' ... ')' ```
func (ClassHeritage) Children ¶
func (s ClassHeritage) Children() Nodes
type ClassMemberSection ¶
type ClassMemberSection struct { Visibility ClassVisibility ClassFieldList ClassFieldList ClassMethodList ClassMethodList ClassPropertyList ClassPropertyList }
- ClassMemberSection ``` ClassVisibility ClassFieldList ClassMethodList ClassPropertyList ```
func (*ClassMemberSection) Children ¶
func (m *ClassMemberSection) Children() Nodes
type ClassMemberSections ¶
type ClassMemberSections []*ClassMemberSection
- ClassMemberSections ``` ClassMemberSection ... ```
func (ClassMemberSections) Children ¶
func (s ClassMemberSections) Children() Nodes
type ClassMethod ¶
type ClassMethod struct { ClassMethod bool Heading ClassMethodHeading Directives ClassMethodDirectiveList }
- ClassMethod ``` [CLASS] ClassMethodHeading [';' ClassMethodDirective ...] ```
func (*ClassMethod) Children ¶
func (m *ClassMethod) Children() Nodes
func (*ClassMethod) ToDeclarations ¶
func (m *ClassMethod) ToDeclarations() astcore.Decls
type ClassMethodDirective ¶
type ClassMethodDirective string
- ClassMethodDirective ``` ABSTRACT ``` ``` VIRTUAL ``` ``` OVERRIDE ``` ``` OVERLOAD ``` ``` REINTRODUCE ```
const ( CmdAbstract ClassMethodDirective = "ABSTRACT" CmdVirtual ClassMethodDirective = "VIRTUAL" CmdOverride ClassMethodDirective = "OVERRIDE" CmdOverload ClassMethodDirective = "OVERLOAD" CmdReintroduce ClassMethodDirective = "REINTRODUCE" )
type ClassMethodDirectiveList ¶
type ClassMethodDirectiveList []ClassMethodDirective
func (ClassMethodDirectiveList) Include ¶
func (s ClassMethodDirectiveList) Include(w string) bool
type ClassMethodHeading ¶
type ClassMethodHeading interface { Node GetIdent() *Ident // contains filtered or unexported methods }
- ClassMethodHeading ``` ProcedureHeading ``` ``` FunctionHeading ``` ``` ConstructorHeading ``` ``` DestructorHeading ```
type ClassMethodList ¶
type ClassMethodList []*ClassMethod
- ClassMethodList ``` ClassMethod ';'... ```
func (ClassMethodList) Children ¶
func (s ClassMethodList) Children() Nodes
type ClassProperty ¶
type ClassProperty struct { Ident *Ident Interface *PropertyInterface Index *ConstExpr Read *IdentRef Write *IdentRef Stored *PropertyStoredSpecifier Default *PropertyDefaultSpecifier Implements *TypeId PortabilityDirective PortabilityDirective // See "Property overrides and redeclarations" in Object Pascal Language Guide Parent *ClassProperty }
- ClassProperty ``` PROPERTY Ident PropertyInterface [INDEX ConstExpr] [READ Ident] [WRITE Ident] [STORED (Ident | Constant)] [(DEFAULT ConstExpr) | NODEFAULT] [IMPLEMENTS TypeId] PortabilityDirective ```
func (*ClassProperty) Children ¶
func (m *ClassProperty) Children() Nodes
func (*ClassProperty) ComputedProperty ¶
func (m *ClassProperty) ComputedProperty() *ClassProperty
func (*ClassProperty) InheritsFrom ¶
func (m *ClassProperty) InheritsFrom(parent *ClassProperty) bool
func (*ClassProperty) ToDeclarations ¶
func (m *ClassProperty) ToDeclarations() astcore.Decls
type ClassPropertyList ¶
type ClassPropertyList []*ClassProperty
- ClassPropertyList ``` ClassProperty ';' ... ```
func (ClassPropertyList) Children ¶
func (s ClassPropertyList) Children() Nodes
type ClassRefType ¶
type ClassVisibility ¶
type ClassVisibility string
- ClassVisibility ``` [PUBLIC | PROTECTED | PRIVATE | PUBLISHED] ```
const ( CvDefault ClassVisibility = "default" // implicitly public CvPrivate ClassVisibility = "PRIVATE" CvProtected ClassVisibility = "PROTECTED" CvPublic ClassVisibility = "PUBLIC" CvPublished ClassVisibility = "PUBLISHED" )
type CompoundStmt ¶
type CompoundStmt struct {
StmtList StmtList
}
- CompoundStmt ``` BEGIN StmtList END ```
func (*CompoundStmt) Children ¶
func (m *CompoundStmt) Children() Nodes
type ConditionalStmt ¶
type ConditionalStmt interface { StructStmt // contains filtered or unexported methods }
- ConditionalStmt ``` IfStmt ``` ``` CaseStmt ```
type ConstExpr ¶
type ConstExpr = Expression
- ConstExpr ``` <constant-expression> ```
func NewConstExpr ¶
func NewConstExpr(arg interface{}) *ConstExpr
type ConstExprs ¶
type ConstExprs = ExprList
type ConstSection ¶
type ConstSection []*ConstantDecl // must implement InterfaceDecl
- ConstSection ``` CONST (ConstantDecl ';')... ```
func (ConstSection) Children ¶
func (s ConstSection) Children() Nodes
func (ConstSection) GetDeclNodes ¶
func (s ConstSection) GetDeclNodes() astcore.DeclNodes
type ConstantDecl ¶
type ConstantDecl struct { *Ident Type Type ConstExpr *ConstExpr PortabilityDirective *PortabilityDirective }
- ConstantDecl ``` Ident '=' ConstExpr PortabilityDirective ``` ``` Ident ':' TypeId '=' TypedConstant PortabilityDirective ```
func (*ConstantDecl) Children ¶
func (m *ConstantDecl) Children() Nodes
func (*ConstantDecl) ToDeclarations ¶
func (m *ConstantDecl) ToDeclarations() astcore.Decls
type ConstructorHeading ¶
type ConstructorHeading struct { *Ident FormalParameters FormalParameters }
func (*ConstructorHeading) Children ¶
func (m *ConstructorHeading) Children() Nodes
func (*ConstructorHeading) GetIdent ¶
func (m *ConstructorHeading) GetIdent() *Ident
type CustomClassRefType ¶
type CustomClassRefType struct {
TypeId *TypeId
}
func NewCustomClassRefType ¶
func NewCustomClassRefType(typeId *TypeId) *CustomClassRefType
func (*CustomClassRefType) Children ¶
func (m *CustomClassRefType) Children() Nodes
func (*CustomClassRefType) IsClassRefType ¶
func (*CustomClassRefType) IsClassRefType() bool
type CustomClassType ¶
type CustomClassType struct { Heritage ClassHeritage Members ClassMemberSections }
- ClassType ``` CLASS ClassHeritage ClassMemberSection END ```
func (*CustomClassType) Children ¶
func (m *CustomClassType) Children() Nodes
func (*CustomClassType) FindMemberDecl ¶
func (m *CustomClassType) FindMemberDecl(name string, includePrivate bool) *astcore.Decl
func (*CustomClassType) FindProperty ¶
func (m *CustomClassType) FindProperty(name string, acendant bool) *ClassProperty
func (*CustomClassType) GetParentClass ¶
func (m *CustomClassType) GetParentClass() *CustomClassType
func (*CustomClassType) IsClassType ¶
func (*CustomClassType) IsClassType() bool
type CustomInterfaceType ¶
type CustomInterfaceType struct { Heritage InterfaceHeritage Guid *InterfaceGuid Members InterfaceMemberList }
- InterfaceType ``` INTERFACE InterfaceHeritage InterfaceGuid InterfaceMemberList ... END ```
func (*CustomInterfaceType) Children ¶
func (m *CustomInterfaceType) Children() Nodes
func (*CustomInterfaceType) IsInterfaceType ¶
func (*CustomInterfaceType) IsInterfaceType() bool
type CustomObjectType ¶
type CustomObjectType struct { Heritage ClassHeritage Members ClassMemberSections }
- ObjectType ``` OBJECT ClassHeritage ClassMemberSection END ```
func (*CustomObjectType) Children ¶
func (m *CustomObjectType) Children() Nodes
func (*CustomObjectType) IsObjectType ¶
func (*CustomObjectType) IsObjectType() bool
type CustomPointerType ¶
type CustomPointerType struct {
TypeId *TypeId
}
func NewCustomPointerType ¶
func NewCustomPointerType(typeId *TypeId) *CustomPointerType
func (*CustomPointerType) Children ¶
func (m *CustomPointerType) Children() Nodes
func (*CustomPointerType) IsPointerType ¶
func (*CustomPointerType) IsPointerType() bool
type DeclSection ¶
type DeclSection interface { Node // contains filtered or unexported methods }
- DeclSection ``` LabelDeclSection ``` ``` ConstSection ``` ``` TypeSection ``` ``` VarSection ``` ``` ProcedureDeclSection ```
type DeclSections ¶
type DeclSections []DeclSection // must implement Node
func (DeclSections) Children ¶
func (m DeclSections) Children() Nodes
type Designator ¶
type Designator struct { *QualId Items DesignatorItems }
- Designator ``` QualId ['.' Ident | '[' ExprList ']' | '^']... ```
func NewDesignator ¶
func NewDesignator(arg interface{}) *Designator
func (*Designator) Children ¶
func (m *Designator) Children() Nodes
type DesignatorFactor ¶
type DesignatorFactor struct { *Designator ExprList ExprList }
func NewDesignatorFactor ¶
func NewDesignatorFactor(arg interface{}) *DesignatorFactor
func (*DesignatorFactor) Children ¶
func (m *DesignatorFactor) Children() Nodes
type DesignatorItem ¶
type DesignatorItem interface { Node // contains filtered or unexported methods }
type DesignatorItemDereference ¶
type DesignatorItemDereference struct { }
func (*DesignatorItemDereference) Children ¶
func (*DesignatorItemDereference) Children() Nodes
type DesignatorItemExprList ¶
type DesignatorItemExprList ExprList // Must implement DesignatorItem, and ancestor ExprList implements Node.
func (DesignatorItemExprList) Children ¶
func (s DesignatorItemExprList) Children() Nodes
type DesignatorItemIdent ¶
type DesignatorItemIdent struct {
*Ident
}
func NewDesignatorItemIdent ¶
func NewDesignatorItemIdent(arg interface{}) *DesignatorItemIdent
func (*DesignatorItemIdent) Children ¶
func (m *DesignatorItemIdent) Children() Nodes
type DesignatorItems ¶
type DesignatorItems []DesignatorItem
func (DesignatorItems) Children ¶
func (s DesignatorItems) Children() Nodes
type DesignatorStatement ¶
type DesignatorStatement interface { SimpleStatement // contains filtered or unexported methods }
DesignatorStatement is an interface for CallStatement and AssignStatement
type DestructorHeading ¶
type DestructorHeading struct {
*Ident
}
- DestructorHeading ``` DESTRUCTOR Ident ```
func (*DestructorHeading) Children ¶
func (m *DestructorHeading) Children() Nodes
func (*DestructorHeading) GetIdent ¶
func (m *DestructorHeading) GetIdent() *Ident
type Directive ¶
type Directive string
const ( DrCdecl Directive = "CDECL" DrRegister Directive = "REGISTER" DrDynamic Directive = "DYNAMIC" DrVirtual Directive = "VIRTUAL" DrExport Directive = "EXPORT" DrExternal Directive = "EXTERNAL" DrNear Directive = "NEAR" DrFar Directive = "FAR" DrForward Directive = "FORWARD" DrMessage Directive = "MESSAGE" // MESSAGE ConstExpr DrOverride Directive = "OVERRIDE" DrOverload Directive = "OVERLOAD" DrPascal Directive = "PASCAL" DrReintroduce Directive = "REINTRODUCE" DrSafecall Directive = "SAFECALL" DrStdcall Directive = "STDCALL" DrVarArgs Directive = "VARARGS" DrLocal Directive = "LOCAL" DrAbstract Directive = "ABSTRACT" )
type EmbeddedTypeKind ¶
type EmbeddedTypeKind int
const ( EtkReal EmbeddedTypeKind = iota + 1 EtkOrdIdent EtkStringType EtkPointerType EtkVariantType )
type EnumeratedType ¶
type EnumeratedType []*EnumeratedTypeElement // must implement OrdinalType
- EnumeratedType ``` '(' EnumeratedTypeElement ','... ')' ```
- EnumeratedTypeElement ``` Ident [ '=' ConstExpr ] ```
func (EnumeratedType) Children ¶
func (m EnumeratedType) Children() Nodes
func (EnumeratedType) IsOrdinalType ¶
func (EnumeratedType) IsOrdinalType() bool
func (EnumeratedType) IsSimpleType ¶
func (EnumeratedType) IsSimpleType() bool
type EnumeratedTypeElement ¶
func (*EnumeratedTypeElement) Children ¶
func (m *EnumeratedTypeElement) Children() Nodes
func (*EnumeratedTypeElement) ToDeclarations ¶
func (m *EnumeratedTypeElement) ToDeclarations() astcore.Decls
type ExceptionBlock ¶
type ExceptionBlock struct { Handlers ExceptionBlockHandlers Else StmtList }
- ExceptionBlock ``` [ON [Ident ‘:’] TypeID DO Statement]... [ELSE Statement...] ```
func (*ExceptionBlock) Children ¶
func (m *ExceptionBlock) Children() Nodes
type ExceptionBlockHandler ¶
type ExceptionBlockHandler struct { Decl *ExceptionBlockHandlerDecl Statement *Statement }
func (*ExceptionBlockHandler) Children ¶
func (m *ExceptionBlockHandler) Children() Nodes
type ExceptionBlockHandlerDecl ¶
func (*ExceptionBlockHandlerDecl) Children ¶
func (m *ExceptionBlockHandlerDecl) Children() Nodes
func (*ExceptionBlockHandlerDecl) ToDeclarations ¶
func (m *ExceptionBlockHandlerDecl) ToDeclarations() astcore.Decls
type ExceptionBlockHandlers ¶
type ExceptionBlockHandlers []*ExceptionBlockHandler
func (ExceptionBlockHandlers) Children ¶
func (s ExceptionBlockHandlers) Children() Nodes
type ExportedHeading ¶
type ExportedHeading struct { *FunctionHeading Directives []Directive ExternalOptions *ExternalOptions }
func (*ExportedHeading) Children ¶
func (m *ExportedHeading) Children() Nodes
func (*ExportedHeading) GetDeclNodes ¶
func (m *ExportedHeading) GetDeclNodes() astcore.DeclNodes
func (*ExportedHeading) ToDeclarations ¶
func (m *ExportedHeading) ToDeclarations() astcore.Decls
type ExportsItem ¶
- ExportsItem ``` Ident [NAME|INDEX “‘” ConstExpr “‘”] [INDEX|NAME “‘” ConstExpr “‘”] ```
func (*ExportsItem) Children ¶
func (m *ExportsItem) Children() Nodes
type ExportsStmt ¶
type ExportsStmt struct {
ExportsItems []*ExportsItem
}
- ExportsStmt ``` EXPORTS ExportsItem [, ExportsItem]... ```
func (*ExportsStmt) Children ¶
func (m *ExportsStmt) Children() Nodes
type ExportsStmts ¶
type ExportsStmts []*ExportsStmt
func (ExportsStmts) Children ¶
func (s ExportsStmts) Children() Nodes
type Expression ¶
type Expression struct { *SimpleExpression RelOpSimpleExpressions RelOpSimpleExpressions }
- Expression ``` SimpleExpression [RelOp SimpleExpression]... ```
func NewExpression ¶
func NewExpression(arg interface{}) *Expression
func (*Expression) Children ¶
func (m *Expression) Children() Nodes
type ExternalOptions ¶
Directive external can be used like these
external; external stringConstant; external stringConstant1 name stringConstant2; external stringConstant index integerConstant;
func NewExternalOptions ¶
func NewExternalOptions(libraryName string, args ...interface{}) *ExternalOptions
type Factor ¶
type Factor interface { Node // contains filtered or unexported methods }
- Factor ``` Designator ['(' ExprList ')'] ``` ``` '@' Designator ``` ``` Number ``` ``` String ``` ``` NIL ``` ``` '(' Expression ')' ``` ``` NOT Factor ``` ``` SetConstructor ``` ``` TypeId '(' Expression ')' ```
type FieldDecl ¶
- FieldDecl ``` IdentList ':' Type PortabilityDirective ```
func (*FieldDecl) ToDeclarations ¶
type FieldDecls ¶
type FieldDecls []*FieldDecl
func (FieldDecls) Children ¶
func (s FieldDecls) Children() Nodes
type FieldList ¶
type FieldList struct { FieldDecls FieldDecls VariantSection *VariantSection }
- FieldList ``` FieldDecl ';'... VariantSection [';'] ```
type FileType ¶
- FileType ``` FILE OF TypeId PortabilityDirective ```
type FixedStringType ¶
type FixedStringType struct { StringType Length *ConstExpr }
func NewFixedStringType ¶
func NewFixedStringType(ident *Ident, length *ConstExpr) *FixedStringType
func (*FixedStringType) Children ¶
func (m *FixedStringType) Children() Nodes
func (*FixedStringType) IsStringType ¶
func (*FixedStringType) IsStringType() bool
type ForStmt ¶
type ForStmt struct { QualId *QualId Initial *Expression Terminal *Expression Down bool // false: TO, true: DOWNTO Statement *Statement }
- ForStmt ``` FOR QualId ':=' Expression (TO | DOWNTO) Expression DO Statement ```
type FormalParameters ¶
type FormalParameters []*FormalParm
- FormalParameters ``` '(' [FormalParm ';'...] ')' ```
func (FormalParameters) Children ¶
func (s FormalParameters) Children() Nodes
type FormalParm ¶
type FormalParm struct { Opt *FormalParmOption *Parameter }
func NewFormalParm ¶
func NewFormalParm(name interface{}, args ...interface{}) *FormalParm
func (*FormalParm) Children ¶
func (m *FormalParm) Children() Nodes
func (*FormalParm) ToDeclarations ¶
func (m *FormalParm) ToDeclarations() astcore.Decls
type FormalParmOption ¶
type FormalParmOption string
- FormalParm ``` [VAR | CONST | OUT] Parameter ```
var ( FpoVar FormalParmOption = "VAR" FpoConst FormalParmOption = "CONST" FpoOut FormalParmOption = "OUT" )
type ForwardDeclaration ¶
type ForwardDeclaredClassType ¶
type ForwardDeclaredClassType struct { // This will be set at the end of actual class type declaration. Actual *CustomClassType }
- ForwardDeclaredClassType ``` CLASS ```
func (*ForwardDeclaredClassType) Children ¶
func (m *ForwardDeclaredClassType) Children() Nodes
func (*ForwardDeclaredClassType) IsClassType ¶
func (*ForwardDeclaredClassType) IsClassType() bool
func (*ForwardDeclaredClassType) SetActualType ¶
func (m *ForwardDeclaredClassType) SetActualType(t Type) error
type FunctionDecl ¶
type FunctionDecl struct { *FunctionHeading Directives []Directive ExternalOptions *ExternalOptions PortabilityDirective *PortabilityDirective Block *Block }
- ProcedureDecl ``` ProcedureHeading ';' Directive PortabilityDirective Block ';' ```
- FunctionDecl ``` FunctionHeading ';' Directive PortabilityDirective Block ';' ```
func (*FunctionDecl) Children ¶
func (m *FunctionDecl) Children() Nodes
func (*FunctionDecl) ToDeclarations ¶
func (m *FunctionDecl) ToDeclarations() astcore.Decls
type FunctionHeading ¶
type FunctionHeading struct { Type FunctionType *Ident FormalParameters FormalParameters ReturnType *TypeId }
func (*FunctionHeading) Children ¶
func (s *FunctionHeading) Children() Nodes
func (*FunctionHeading) GetIdent ¶
func (s *FunctionHeading) GetIdent() *Ident
type Goal ¶
type Goal interface { astcore.DeclNode GetPath() string // contains filtered or unexported methods }
- Goal ``` (Program | Package | Library | Unit) ```
type GotoStatement ¶
(GotoStatement) ``` GOTO LabelId ```
func (*GotoStatement) Children ¶
func (m *GotoStatement) Children() Nodes
type IfStmt ¶
type IfStmt struct { Condition *Expression Then *Statement Else *Statement }
type ImplementationSection ¶
type ImplementationSection struct { UsesClause UsesClause // optional DeclSections DeclSections ExportsStmts ExportsStmts Node }
- ImplementationSection ``` IMPLEMENTATION UsesClause DeclSection... ExportsStmt... ```
func (*ImplementationSection) Children ¶
func (m *ImplementationSection) Children() Nodes
type InheritedStatement ¶
(InheritedStatement) ``` INHERITED ```
func (*InheritedStatement) Children ¶
func (*InheritedStatement) Children() Nodes
type InitSection ¶
- InitSection ``` INITIALIZATION StmtList [FINALIZATION StmtList] END ``` ``` BEGIN StmtList END ``` ``` END ```
func (*InitSection) Children ¶
func (m *InitSection) Children() Nodes
type InterfaceDecl ¶
type InterfaceDecl interface { Node GetDeclNodes() astcore.DeclNodes // contains filtered or unexported methods }
- InterfaceDecl ``` ConstSection ``` ``` TypeSection ``` ``` VarSection ``` ``` ExportedHeading ```
type InterfaceDecls ¶
type InterfaceDecls []InterfaceDecl
func (InterfaceDecls) Children ¶
func (s InterfaceDecls) Children() Nodes
type InterfaceGuid ¶
type InterfaceGuid struct {
*ConstExpr
}
- InterfaceGuid ``` '[' ConstExpr of string ']' ```
func (*InterfaceGuid) Children ¶
func (m *InterfaceGuid) Children() Nodes
type InterfaceHeritage ¶
type InterfaceHeritage []*TypeId
- InterfaceHeritage ```
'(' TypeId ',' ... ')'
```
func (InterfaceHeritage) Children ¶
func (s InterfaceHeritage) Children() Nodes
type InterfaceMember ¶
type InterfaceMember interface { Node // contains filtered or unexported methods }
- InterfaceMember ``` InterfaceMethod ``` ``` InterfaceProperty ```
type InterfaceMemberList ¶
type InterfaceMemberList []InterfaceMember
- InterfaceMemberList ``` InterfaceMember ';'... ```
func (InterfaceMemberList) Children ¶
func (s InterfaceMemberList) Children() Nodes
type InterfaceMethod ¶
type InterfaceMethod struct { Heading InterfaceMethodHeading Directives InterfaceMethodDirectives }
- InterfaceMethod ``` InterfaceMethodHeading; [InterfaceMethodDirective ';'...]; ```
func (*InterfaceMethod) Children ¶
func (m *InterfaceMethod) Children() Nodes
type InterfaceMethodDirective ¶
type InterfaceMethodDirective string
- InterfaceMethodDirective ``` stdcall ```
const (
ImdStdcall InterfaceMethodDirective = "STDCALL"
)
type InterfaceMethodDirectives ¶
type InterfaceMethodDirectives []InterfaceMethodDirective
type InterfaceMethodHeading ¶
type InterfaceMethodHeading interface { Node // contains filtered or unexported methods }
- InterfaceMethodHeading ``` ProcedureHeading ``` ``` FunctionHeading ```
type InterfaceProperty ¶
type InterfaceProperty struct { Ident *Ident Interface *PropertyInterface Read *IdentRef Write *IdentRef }
- InterfaceProperty ``` PROPERTY Ident PropertyInterface [READ Ident] [WRITE Ident] ```
func (*InterfaceProperty) Children ¶
func (m *InterfaceProperty) Children() Nodes
type InterfaceSection ¶
type InterfaceSection struct { UsesClause UsesClause // optional InterfaceDecls InterfaceDecls }
- InterfaceSection ``` INTERFACE UsesClause InterfaceDecl... ```
func (*InterfaceSection) Children ¶
func (m *InterfaceSection) Children() Nodes
type InterfaceType ¶
type LabelDeclSection ¶
type LabelDeclSection struct {
*LabelId
}
- LabelDeclSection ``` LABEL LabelId ';' ```
func (*LabelDeclSection) Children ¶
func (m *LabelDeclSection) Children() Nodes
func (*LabelDeclSection) ToDeclarations ¶
func (m *LabelDeclSection) ToDeclarations() astcore.Decls
type LoopStmt ¶
type LoopStmt interface { StructStmt // contains filtered or unexported methods }
- LoopStmt ``` RepeatStmt ``` ``` WhileStmt ``` ``` ForStmt ```
type MulOpFactor ¶
type MulOpFactor struct { MulOp string // '*' | '/' | "DIV" | "MOD", "AND", "SHL", "SHR" Factor Factor }
- MulOp ``` '*' ``` `“ '/' ``` `“ DIV ``` `“ MOD ``` ``` AND ``` ``` SHL ``` ``` SHR ``` ``` AS ```
func (*MulOpFactor) Children ¶
func (m *MulOpFactor) Children() Nodes
type MulOpFactors ¶
type MulOpFactors []*MulOpFactor
func (MulOpFactors) Children ¶
func (s MulOpFactors) Children() Nodes
type Namespace ¶
type Namespace interface { GetIdent() *Ident // Declarations in the namespace. // They are called by just only its ident or by Namespace.(ident) // InsideDecls doesn't include unit names in uses clause. because // they can't be called by namespace.(unit name) GetDeclMap() astcore.DeclMap }
implemented by Program and Unit.
type NumberFactor ¶
type NumberFactor struct {
Value string
}
func NewNumber ¶
func NewNumber(v string) *NumberFactor
func (*NumberFactor) Children ¶
func (*NumberFactor) Children() Nodes
type ObjectType ¶
type OrdIdent ¶
type OrdIdent interface { OrdinalType IsOrdIdent() bool }
- OrdIdent ``` SHORTINT ``` ``` SMALLINT ``` ``` INTEGER ``` ``` BYTE ``` ``` LONGINT ``` ``` INT64 ``` ``` WORD ``` ``` BOOLEAN ``` ``` CHAR ``` ``` WIDECHAR ``` ``` LONGWORD ``` ``` PCHAR ```
type OrdinalType ¶
type OrdinalType interface { SimpleType IsOrdinalType() bool }
type Parameter ¶
type Parameter struct { IdentList Type *ParameterType ConstExpr *ConstExpr }
func NewParameter ¶
func NewParameter(name interface{}, typArg interface{}, args ...interface{}) *Parameter
func (*Parameter) SetConstExpr ¶
func (m *Parameter) SetConstExpr(arg interface{})
type ParameterType ¶
- Parameter ``` IdentList [':' ([ARRAY OF] SimpleType | STRING | FILE)] ``` (Parameter type is not only SimpleType, STRING or FILE. TypeId also can be also.) ``` Ident ':' SimpleType '=' ConstExpr ```
func NewArrayParameterType ¶
func NewArrayParameterType(arg interface{}) *ParameterType
func NewParameterType ¶
func NewParameterType(arg interface{}) *ParameterType
func (*ParameterType) Children ¶
func (m *ParameterType) Children() Nodes
type Parentheses ¶
type Parentheses struct {
Expression *Expression
}
Parentheses
func (*Parentheses) Children ¶
func (m *Parentheses) Children() Nodes
type PointerType ¶
- PointerType ``` '^' TypeId PortabilityDirective ```
type PortabilityDirective ¶
type PortabilityDirective string
const ( PdPlatform PortabilityDirective = "platform" PdDeprecated PortabilityDirective = "deprecated" PdLibrary PortabilityDirective = "library" )
type ProcedureDeclSection ¶
type ProcedureDeclSection interface { DeclSection // contains filtered or unexported methods }
- ProcedureDeclSection ``` ProcedureDecl ``` ``` FunctionDecl ```
type ProcedureType ¶
type ProcedureType struct { FunctionType FunctionType FormalParameters FormalParameters ReturnType *TypeId OfObject bool }
func (ProcedureType) Children ¶
func (m ProcedureType) Children() Nodes
type Program ¶
type Program struct { Path string *Ident ProgramBlock *ProgramBlock DeclMap astcore.DeclMap }
- Program ``` [PROGRAM Ident ['(' IdentList ')'] ';'] ProgramBlock '.' ```
In standard Pascal, a program heading can include parameters after the program name:
program Calc(input, output);
Borland’s Object Pascal compiler ignores these parameters.
func (*Program) GetDeclMap ¶
func (*Program) ToDeclarations ¶
type ProgramBlock ¶
type ProgramBlock struct { UsesClause UsesClause *Block }
- ProgramBlock ``` UsesClause Block ```
func (*ProgramBlock) Children ¶
func (m *ProgramBlock) Children() Nodes
type PropertyDefaultSpecifier ¶
func (*PropertyDefaultSpecifier) Children ¶
func (m *PropertyDefaultSpecifier) Children() Nodes
type PropertyInterface ¶
type PropertyInterface struct { Parameters FormalParameters Type *TypeId }
- PropertyInterface ``` FormalParameters ':' TypeId ```
func (*PropertyInterface) Children ¶
func (m *PropertyInterface) Children() Nodes
type PropertyStoredSpecifier ¶
func (*PropertyStoredSpecifier) Children ¶
func (m *PropertyStoredSpecifier) Children() Nodes
type QualId ¶
- QualId ``` [NamespaceId '.'] Ident ```
- NamespaceId ``` <unit-identifier> ``` ``` <program-identifier> ```
type RaiseStmt ¶
type RaiseStmt struct { Object *Expression Address *Expression }
- RaiseStmt ``` RAISE [object] [AT address] ```
type RealType ¶
type RealType interface { SimpleType IsRealType() bool }
- RealType ``` REAL48 ``` ``` REAL ``` ``` SINGLE ``` ``` DOUBLE ``` ``` EXTENDED ``` ``` CURRENCY ``` ``` COMP ```
type RecType ¶
- RecType ``` RECORD FieldList END PortabilityDirective ```
type RecVariant ¶
type RecVariant struct { ConstExprs ConstExprs FieldList *FieldList }
- RecVariant ``` ConstExpr ','... ':' '(' FieldList ')' ```
func (*RecVariant) Children ¶
func (m *RecVariant) Children() Nodes
type RecVariants ¶
type RecVariants []*RecVariant
func (RecVariants) Children ¶
func (s RecVariants) Children() Nodes
type RelOpSimpleExpression ¶
type RelOpSimpleExpression struct { RelOp string // '>' | '<' | '<=' | '>=' | '=' | '<>' | "IN" | "IS" | "AS" *SimpleExpression }
- RelOp ``` '>' ``` `“ '<' ``` ``` '<=' ``` ``` '>=' ``` ``` '=' ``` ``` '<>' ``` ``` IN ``` ``` IS ```
func (*RelOpSimpleExpression) Children ¶
func (m *RelOpSimpleExpression) Children() Nodes
type RelOpSimpleExpressions ¶
type RelOpSimpleExpressions []*RelOpSimpleExpression
func (RelOpSimpleExpressions) Children ¶
func (s RelOpSimpleExpressions) Children() Nodes
type RepeatStmt ¶
type RepeatStmt struct { StmtList StmtList Condition *Expression }
- RepeatStmt ``` REPEAT StmtList UNTIL Expression ```
func (*RepeatStmt) Children ¶
func (m *RepeatStmt) Children() Nodes
type SetConstructor ¶
type SetConstructor struct {
SetElements []*SetElement
}
- SetConstructor ``` '[' [SetElement ','...] ']' ```
func (*SetConstructor) Children ¶
func (m *SetConstructor) Children() Nodes
type SetElement ¶
type SetElement struct { *Expression SubRangeEnd *Expression }
- SetElement ``` Expression ['..' Expression] ```
func NewSetElement ¶
func NewSetElement(expr *Expression) *SetElement
func (*SetElement) Children ¶
func (m *SetElement) Children() Nodes
type SetType ¶
type SetType struct { OrdinalType Packed bool }
- SetType ``` SET OF OrdinalType PortabilityDirective ```
type SimpleExpression ¶
type SimpleExpression struct { UnaryOp *string // '+' | '-' or nil *Term AddOpTerms AddOpTerms }
- SimpleExpression ``` ['+' | '-'] Term [AddOp Term]... ```
func NewSimpleExpression ¶
func NewSimpleExpression(arg interface{}) *SimpleExpression
func (*SimpleExpression) Children ¶
func (m *SimpleExpression) Children() Nodes
type SimpleStatement ¶
type SimpleStatement interface { StatementBody // contains filtered or unexported methods }
type SimpleType ¶
- SimpleType ``` (OrdinalType | RealType) ```
type Statement ¶
type Statement struct { LabelId *LabelId Body StatementBody }
- Statement ``` [LabelId ':'] [SimpleStatement | StructStmt] ```
type StatementBody ¶
type StatementBody interface { Node // contains filtered or unexported methods }
- SimpleStatement (CallStatement) ``` Designator ['(' ExprList ')'] ``` (AssignStatement) ``` Designator ':=' Expression ``` (InheritedStatement) ``` INHERITED ``` (GotoStatement) ``` GOTO LabelId ```
- StructStmt ``` CompoundStmt ``` ``` ConditionalStmt ``` ``` LoopStmt ``` ``` WithStmt ``` ``` TryExceptStmt ``` ``` TryFinallyStmt ``` ``` RaiseStmt ``` ``` AssemblerStmt ```
type StringFactor ¶
type StringFactor struct {
Value string
}
``` String ```
func NewString ¶
func NewString(v string) *StringFactor
func (*StringFactor) Children ¶
func (*StringFactor) Children() Nodes
type StringType ¶
- StringType ``` STRING ``` ``` ANSISTRING ``` ``` WIDESTRING ``` ``` STRING '[' ConstExpr ']' ```
type StrucType ¶
- StrucType ``` [PACKED] (ArrayType [PACKED]| SetType | FileType | RecType [PACKED]) ```
NOTICE this is NOT "StructType" but "StrucType"
type StructStmt ¶
type StructStmt interface { StatementBody // contains filtered or unexported methods }
type SubrangeType ¶
type SubrangeType struct { OrdinalType Low *ConstExpr High *ConstExpr }
- SubrangeType ``` ConstExpr '..' ConstExpr ```
func (*SubrangeType) Children ¶
func (m *SubrangeType) Children() Nodes
func (*SubrangeType) IsOrdinalType ¶
func (*SubrangeType) IsOrdinalType() bool
func (*SubrangeType) IsSimpleType ¶
func (*SubrangeType) IsSimpleType() bool
type Term ¶
type Term struct { Factor Factor MulOpFactors MulOpFactors }
- Term ``` Factor [MulOp Factor]... ```
type ThreadVarDecl ¶
func (*ThreadVarDecl) Children ¶
func (m *ThreadVarDecl) Children() Nodes
func (*ThreadVarDecl) ToDeclarations ¶
func (m *ThreadVarDecl) ToDeclarations() astcore.Decls
type ThreadVarSection ¶
type ThreadVarSection []*ThreadVarDecl // must implement InterfaceDecl
threadvar X: Integer; Thread-variable declarations • cannot occur within a procedure or function. • cannot include initializations. • cannot specify the absolute directive.
func (ThreadVarSection) Children ¶
func (s ThreadVarSection) Children() Nodes
func (ThreadVarSection) GetDeclNodes ¶
func (s ThreadVarSection) GetDeclNodes() astcore.DeclNodes
type TryExceptStmt ¶
type TryExceptStmt struct { Statements StmtList ExceptionBlock *ExceptionBlock }
- TryExceptStmt ``` TRY Statement... EXCEPT ExceptionBlock END ```
func (*TryExceptStmt) Children ¶
func (m *TryExceptStmt) Children() Nodes
type TryFinallyStmt ¶
- TryFinallyStmt ``` TRY Statement FINALLY Statement END ```
func (*TryFinallyStmt) Children ¶
func (m *TryFinallyStmt) Children() Nodes
type TryStmt ¶
type TryStmt interface { StructStmt // contains filtered or unexported methods }
type Type ¶
type Type interface { Node // contains filtered or unexported methods }
- Type ``` TypeId ``` ``` SimpleType ``` ``` StrucType ``` ``` PointerType ``` ``` StringType ``` ``` ProcedureType ``` ``` VariantType ``` ``` ClassRefType ```
type TypeCast ¶
type TypeCast struct { TypeId *TypeId Expression *Expression }
``` TypeId '(' Expression ')' ```
type TypeDecl ¶
type TypeDecl struct { *Ident Type Type PortabilityDirective *PortabilityDirective }
- TypeDecl ``` Ident '=' [TYPE] Type PortabilityDirective ``` ``` Ident '=' [TYPE] RestrictedType PortabilityDirective ```
func (*TypeDecl) ToDeclarations ¶
type TypeEmbedded ¶
type TypeEmbedded struct { Kind EmbeddedTypeKind Ident *Ident }
func (*TypeEmbedded) Children ¶
func (m *TypeEmbedded) Children() Nodes
func (*TypeEmbedded) IsOrdIdent ¶
func (m *TypeEmbedded) IsOrdIdent() bool
func (*TypeEmbedded) IsOrdinalType ¶
func (m *TypeEmbedded) IsOrdinalType() bool
func (*TypeEmbedded) IsPointerType ¶
func (m *TypeEmbedded) IsPointerType() bool
func (*TypeEmbedded) IsRealType ¶
func (m *TypeEmbedded) IsRealType() bool
func (*TypeEmbedded) IsSimpleType ¶
func (m *TypeEmbedded) IsSimpleType() bool
func (*TypeEmbedded) IsStringType ¶
func (m *TypeEmbedded) IsStringType() bool
func (*TypeEmbedded) IsVariantType ¶
func (m *TypeEmbedded) IsVariantType() bool
type TypeId ¶
- TypeId ``` [UnitId '.'] <type-identifier> ```
func NewEmbeddedPointerType ¶
func NewOrdIdent ¶
func NewPointerType ¶
func NewRealType ¶
func NewStringType ¶
func NewVariantType ¶
func (*TypeId) IsOrdIdent ¶
func (*TypeId) IsOrdinalType ¶
func (*TypeId) IsPointerType ¶
func (*TypeId) IsRealType ¶
func (*TypeId) IsSimpleType ¶
func (*TypeId) IsStringType ¶
func (*TypeId) IsVariantType ¶
type TypeSection ¶
type TypeSection []*TypeDecl
- TypeSection ``` TYPE (TypeDecl ';')... ```
func (TypeSection) Children ¶
func (s TypeSection) Children() Nodes
func (TypeSection) GetDeclNodes ¶
func (s TypeSection) GetDeclNodes() astcore.DeclNodes
type Unit ¶
type Unit struct { Path string *Ident PortabilityDirective *PortabilityDirective // optional InterfaceSection *InterfaceSection ImplementationSection *ImplementationSection InitSection *InitSection // optional DeclMap astcore.DeclMap Namespace Goal }
- Unit ``` UNIT Ident PortabilityDirective ';' InterfaceSection ImplementationSection InitSection '.' ```
func (*Unit) GetDeclMap ¶
func (*Unit) ToDeclarations ¶
type UsesClause ¶
type UsesClause []*UsesClauseItem
- UsesClause ``` USES IdentList ';' ```
In the uses clause of a program or library, any unit name may be followed by the reserved word in and the name of a source file, with or without a directory path, in single quotation marks; directory paths can be absolute or relative. Examples:
uses Windows, Messages, SysUtils, Strings in 'C:\Classes\Strings.pas', Classes;
func (UsesClause) Children ¶
func (s UsesClause) Children() Nodes
func (UsesClause) Find ¶
func (s UsesClause) Find(name string) *UsesClauseItem
func (UsesClause) IdentList ¶
func (s UsesClause) IdentList() IdentList
func (UsesClause) Units ¶
func (s UsesClause) Units() Units
type UsesClauseItem ¶
func NewUnitRef ¶
func NewUnitRef(name interface{}, paths ...string) *UsesClauseItem
func (*UsesClauseItem) Children ¶
func (m *UsesClauseItem) Children() Nodes
func (*UsesClauseItem) EffectivePath ¶
func (m *UsesClauseItem) EffectivePath() string
func (*UsesClauseItem) ToDeclarations ¶
func (m *UsesClauseItem) ToDeclarations() astcore.Decls
func (*UsesClauseItem) UnquotedPath ¶
func (m *UsesClauseItem) UnquotedPath() string
type ValueFactor ¶
type ValueFactor struct {
Value string
}
func NewValueFactor ¶
func NewValueFactor(v string) *ValueFactor
func (*ValueFactor) Children ¶
func (*ValueFactor) Children() Nodes
type VarDecl ¶
type VarDecl struct { IdentList Type Type Absolute VarDeclAbsolute ConstExpr *ConstExpr PortabilityDirective *PortabilityDirective }
- VarDecl
- (On Windows) ``` IdentList ':' Type [(ABSOLUTE (Ident | ConstExpr)) | '=' ConstExpr] PortabilityDirective ```
- On Linux ``` IdentList ':' Type [ABSOLUTE (Ident) | '=' ConstExpr] PortabilityDirective ```
func (*VarDecl) ToDeclarations ¶
type VarDeclAbsolute ¶
type VarDeclAbsolute interface { Node // contains filtered or unexported methods }
type VarDeclAbsoluteConstExpr ¶
type VarDeclAbsoluteConstExpr ConstExpr
type VarDeclAbsoluteIdent ¶
type VarDeclAbsoluteIdent Ident
func NewVarDeclAbsoluteIdent ¶
func NewVarDeclAbsoluteIdent(arg interface{}) *VarDeclAbsoluteIdent
func (*VarDeclAbsoluteIdent) Children ¶
func (*VarDeclAbsoluteIdent) Children() Nodes
type VarSection ¶
type VarSection []*VarDecl
- VarSection ``` VAR (VarDecl ';')... ```
func (VarSection) Children ¶
func (s VarSection) Children() Nodes
func (VarSection) GetDeclNodes ¶
func (s VarSection) GetDeclNodes() astcore.DeclNodes
type VariantSection ¶
type VariantSection struct { Ident *Ident TypeId OrdinalType RecVariants RecVariants }
- VariantSection ``` CASE [Ident ':'] TypeId OF RecVariant ';'... ```
func (*VariantSection) Children ¶
func (m *VariantSection) Children() Nodes
type VariantType ¶
- VariantType ``` VARIANT ``` ``` OLEVARIANT ```
type WhileStmt ¶
type WhileStmt struct { Condition *Expression Statement *Statement }
- WhileStmt ``` WHILE Expression DO Statement ```
Source Files ¶
- aliases.go
- block.go
- const.go
- directive.go
- expression.go
- function.go
- function_heading.go
- goal.go
- manifest_constants.go
- namespace.go
- portability_directive.go
- program.go
- statement.go
- type.go
- type_class.go
- type_class_ref.go
- type_embedded.go
- type_forward_declaration.go
- type_id.go
- type_interface.go
- type_pointer.go
- type_procedure.go
- type_simple.go
- type_string.go
- type_struc.go
- type_variant.go
- unit.go
- uses_clause.go
- var.go