@nomicfoundation/slang
Version:
A modular set of compiler APIs empowering the next generation of Solidity code analysis and developer tooling. Written in Rust and distributed in multiple languages.
1,638 lines • 240 kB
text/typescript
import { NonterminalNode, TerminalNode } from "../cst/index.mjs";
/**
* This node represents a `SourceUnit` nonterminal, with the following structure:
*
* ```ebnf
* SourceUnit = (* members: *) SourceUnitMembers;
* ```
*/
export declare class SourceUnit {
/**
* The underlying nonterminal CST node of kind `SourceUnit`.
*/
readonly cst: NonterminalNode;
private readonly fetch;
/**
* Constructs a new AST node of type `SourceUnit`, given a nonterminal CST node of the same kind.
*/
constructor(
/**
* The underlying nonterminal CST node of kind `SourceUnit`.
*/
cst: NonterminalNode);
/**
* Returns the child node that has the label `members`.
*/
get members(): SourceUnitMembers;
}
/**
* This node represents a `PragmaDirective` nonterminal, with the following structure:
*
* ```ebnf
* PragmaDirective = (* pragma_keyword: *) PRAGMA_KEYWORD
* (* pragma: *) Pragma
* (* semicolon: *) SEMICOLON;
* ```
*/
export declare class PragmaDirective {
/**
* The underlying nonterminal CST node of kind `PragmaDirective`.
*/
readonly cst: NonterminalNode;
private readonly fetch;
/**
* Constructs a new AST node of type `PragmaDirective`, given a nonterminal CST node of the same kind.
*/
constructor(
/**
* The underlying nonterminal CST node of kind `PragmaDirective`.
*/
cst: NonterminalNode);
/**
* Returns the child node that has the label `pragma_keyword`.
*/
get pragmaKeyword(): TerminalNode;
/**
* Returns the child node that has the label `pragma`.
*/
get pragma(): Pragma;
/**
* Returns the child node that has the label `semicolon`.
*/
get semicolon(): TerminalNode;
}
/**
* This node represents a `AbicoderPragma` nonterminal, with the following structure:
*
* ```ebnf
* (* Introduced in 0.7.5 *)
* AbicoderPragma = (* abicoder_keyword: *) ABICODER_KEYWORD
* (* version: *) AbicoderVersion;
* ```
*/
export declare class AbicoderPragma {
/**
* The underlying nonterminal CST node of kind `AbicoderPragma`.
*/
readonly cst: NonterminalNode;
private readonly fetch;
/**
* Constructs a new AST node of type `AbicoderPragma`, given a nonterminal CST node of the same kind.
*/
constructor(
/**
* The underlying nonterminal CST node of kind `AbicoderPragma`.
*/
cst: NonterminalNode);
/**
* Returns the child node that has the label `abicoder_keyword`.
*/
get abicoderKeyword(): TerminalNode;
/**
* Returns the child node that has the label `version`.
*/
get version(): AbicoderVersion;
}
/**
* This node represents a `ExperimentalPragma` nonterminal, with the following structure:
*
* ```ebnf
* (* Introduced in 0.4.16 *)
* ExperimentalPragma = (* experimental_keyword: *) EXPERIMENTAL_KEYWORD
* (* feature: *) ExperimentalFeature;
* ```
*/
export declare class ExperimentalPragma {
/**
* The underlying nonterminal CST node of kind `ExperimentalPragma`.
*/
readonly cst: NonterminalNode;
private readonly fetch;
/**
* Constructs a new AST node of type `ExperimentalPragma`, given a nonterminal CST node of the same kind.
*/
constructor(
/**
* The underlying nonterminal CST node of kind `ExperimentalPragma`.
*/
cst: NonterminalNode);
/**
* Returns the child node that has the label `experimental_keyword`.
*/
get experimentalKeyword(): TerminalNode;
/**
* Returns the child node that has the label `feature`.
*/
get feature(): ExperimentalFeature;
}
/**
* This node represents a `VersionPragma` nonterminal, with the following structure:
*
* ```ebnf
* VersionPragma = (* solidity_keyword: *) SOLIDITY_KEYWORD
* (* sets: *) VersionExpressionSets;
* ```
*/
export declare class VersionPragma {
/**
* The underlying nonterminal CST node of kind `VersionPragma`.
*/
readonly cst: NonterminalNode;
private readonly fetch;
/**
* Constructs a new AST node of type `VersionPragma`, given a nonterminal CST node of the same kind.
*/
constructor(
/**
* The underlying nonterminal CST node of kind `VersionPragma`.
*/
cst: NonterminalNode);
/**
* Returns the child node that has the label `solidity_keyword`.
*/
get solidityKeyword(): TerminalNode;
/**
* Returns the child node that has the label `sets`.
*/
get sets(): VersionExpressionSets;
}
/**
* This node represents a `VersionRange` nonterminal, with the following structure:
*
* ```ebnf
* VersionRange = (* start: *) VersionLiteral
* (* minus: *) MINUS
* (* end: *) VersionLiteral;
* ```
*/
export declare class VersionRange {
/**
* The underlying nonterminal CST node of kind `VersionRange`.
*/
readonly cst: NonterminalNode;
private readonly fetch;
/**
* Constructs a new AST node of type `VersionRange`, given a nonterminal CST node of the same kind.
*/
constructor(
/**
* The underlying nonterminal CST node of kind `VersionRange`.
*/
cst: NonterminalNode);
/**
* Returns the child node that has the label `start`.
*/
get start(): VersionLiteral;
/**
* Returns the child node that has the label `minus`.
*/
get minus(): TerminalNode;
/**
* Returns the child node that has the label `end`.
*/
get end(): VersionLiteral;
}
/**
* This node represents a `VersionTerm` nonterminal, with the following structure:
*
* ```ebnf
* VersionTerm = (* operator: *) VersionOperator?
* (* literal: *) VersionLiteral;
* ```
*/
export declare class VersionTerm {
/**
* The underlying nonterminal CST node of kind `VersionTerm`.
*/
readonly cst: NonterminalNode;
private readonly fetch;
/**
* Constructs a new AST node of type `VersionTerm`, given a nonterminal CST node of the same kind.
*/
constructor(
/**
* The underlying nonterminal CST node of kind `VersionTerm`.
*/
cst: NonterminalNode);
/**
* Returns the child node that has the label `operator`.
*/
get operator(): VersionOperator | undefined;
/**
* Returns the child node that has the label `literal`.
*/
get literal(): VersionLiteral;
}
/**
* This node represents a `ImportDirective` nonterminal, with the following structure:
*
* ```ebnf
* ImportDirective = (* import_keyword: *) IMPORT_KEYWORD
* (* clause: *) ImportClause
* (* semicolon: *) SEMICOLON;
* ```
*/
export declare class ImportDirective {
/**
* The underlying nonterminal CST node of kind `ImportDirective`.
*/
readonly cst: NonterminalNode;
private readonly fetch;
/**
* Constructs a new AST node of type `ImportDirective`, given a nonterminal CST node of the same kind.
*/
constructor(
/**
* The underlying nonterminal CST node of kind `ImportDirective`.
*/
cst: NonterminalNode);
/**
* Returns the child node that has the label `import_keyword`.
*/
get importKeyword(): TerminalNode;
/**
* Returns the child node that has the label `clause`.
*/
get clause(): ImportClause;
/**
* Returns the child node that has the label `semicolon`.
*/
get semicolon(): TerminalNode;
}
/**
* This node represents a `PathImport` nonterminal, with the following structure:
*
* ```ebnf
* PathImport = (* path: *) StringLiteral
* (* alias: *) ImportAlias?;
* ```
*/
export declare class PathImport {
/**
* The underlying nonterminal CST node of kind `PathImport`.
*/
readonly cst: NonterminalNode;
private readonly fetch;
/**
* Constructs a new AST node of type `PathImport`, given a nonterminal CST node of the same kind.
*/
constructor(
/**
* The underlying nonterminal CST node of kind `PathImport`.
*/
cst: NonterminalNode);
/**
* Returns the child node that has the label `path`.
*/
get path(): StringLiteral;
/**
* Returns the child node that has the label `alias`.
*/
get alias(): ImportAlias | undefined;
}
/**
* This node represents a `NamedImport` nonterminal, with the following structure:
*
* ```ebnf
* NamedImport = (* asterisk: *) ASTERISK
* (* alias: *) ImportAlias
* (* from_keyword: *) FROM_KEYWORD
* (* path: *) StringLiteral;
* ```
*/
export declare class NamedImport {
/**
* The underlying nonterminal CST node of kind `NamedImport`.
*/
readonly cst: NonterminalNode;
private readonly fetch;
/**
* Constructs a new AST node of type `NamedImport`, given a nonterminal CST node of the same kind.
*/
constructor(
/**
* The underlying nonterminal CST node of kind `NamedImport`.
*/
cst: NonterminalNode);
/**
* Returns the child node that has the label `asterisk`.
*/
get asterisk(): TerminalNode;
/**
* Returns the child node that has the label `alias`.
*/
get alias(): ImportAlias;
/**
* Returns the child node that has the label `from_keyword`.
*/
get fromKeyword(): TerminalNode;
/**
* Returns the child node that has the label `path`.
*/
get path(): StringLiteral;
}
/**
* This node represents a `ImportDeconstruction` nonterminal, with the following structure:
*
* ```ebnf
* ImportDeconstruction = (* open_brace: *) OPEN_BRACE
* (* symbols: *) ImportDeconstructionSymbols
* (* close_brace: *) CLOSE_BRACE
* (* from_keyword: *) FROM_KEYWORD
* (* path: *) StringLiteral;
* ```
*/
export declare class ImportDeconstruction {
/**
* The underlying nonterminal CST node of kind `ImportDeconstruction`.
*/
readonly cst: NonterminalNode;
private readonly fetch;
/**
* Constructs a new AST node of type `ImportDeconstruction`, given a nonterminal CST node of the same kind.
*/
constructor(
/**
* The underlying nonterminal CST node of kind `ImportDeconstruction`.
*/
cst: NonterminalNode);
/**
* Returns the child node that has the label `open_brace`.
*/
get openBrace(): TerminalNode;
/**
* Returns the child node that has the label `symbols`.
*/
get symbols(): ImportDeconstructionSymbols;
/**
* Returns the child node that has the label `close_brace`.
*/
get closeBrace(): TerminalNode;
/**
* Returns the child node that has the label `from_keyword`.
*/
get fromKeyword(): TerminalNode;
/**
* Returns the child node that has the label `path`.
*/
get path(): StringLiteral;
}
/**
* This node represents a `ImportDeconstructionSymbol` nonterminal, with the following structure:
*
* ```ebnf
* ImportDeconstructionSymbol = (* name: *) IDENTIFIER
* (* alias: *) ImportAlias?;
* ```
*/
export declare class ImportDeconstructionSymbol {
/**
* The underlying nonterminal CST node of kind `ImportDeconstructionSymbol`.
*/
readonly cst: NonterminalNode;
private readonly fetch;
/**
* Constructs a new AST node of type `ImportDeconstructionSymbol`, given a nonterminal CST node of the same kind.
*/
constructor(
/**
* The underlying nonterminal CST node of kind `ImportDeconstructionSymbol`.
*/
cst: NonterminalNode);
/**
* Returns the child node that has the label `name`.
*/
get name(): TerminalNode;
/**
* Returns the child node that has the label `alias`.
*/
get alias(): ImportAlias | undefined;
}
/**
* This node represents a `ImportAlias` nonterminal, with the following structure:
*
* ```ebnf
* ImportAlias = (* as_keyword: *) AS_KEYWORD
* (* identifier: *) IDENTIFIER;
* ```
*/
export declare class ImportAlias {
/**
* The underlying nonterminal CST node of kind `ImportAlias`.
*/
readonly cst: NonterminalNode;
private readonly fetch;
/**
* Constructs a new AST node of type `ImportAlias`, given a nonterminal CST node of the same kind.
*/
constructor(
/**
* The underlying nonterminal CST node of kind `ImportAlias`.
*/
cst: NonterminalNode);
/**
* Returns the child node that has the label `as_keyword`.
*/
get asKeyword(): TerminalNode;
/**
* Returns the child node that has the label `identifier`.
*/
get identifier(): TerminalNode;
}
/**
* This node represents a `UsingDirective` nonterminal, with the following structure:
*
* ```ebnf
* UsingDirective = (* using_keyword: *) USING_KEYWORD
* (* clause: *) UsingClause
* (* for_keyword: *) FOR_KEYWORD
* (* target: *) UsingTarget
* (* global_keyword: *) GLOBAL_KEYWORD? (* Introduced in 0.8.13 *)
* (* semicolon: *) SEMICOLON;
* ```
*/
export declare class UsingDirective {
/**
* The underlying nonterminal CST node of kind `UsingDirective`.
*/
readonly cst: NonterminalNode;
private readonly fetch;
/**
* Constructs a new AST node of type `UsingDirective`, given a nonterminal CST node of the same kind.
*/
constructor(
/**
* The underlying nonterminal CST node of kind `UsingDirective`.
*/
cst: NonterminalNode);
/**
* Returns the child node that has the label `using_keyword`.
*/
get usingKeyword(): TerminalNode;
/**
* Returns the child node that has the label `clause`.
*/
get clause(): UsingClause;
/**
* Returns the child node that has the label `for_keyword`.
*/
get forKeyword(): TerminalNode;
/**
* Returns the child node that has the label `target`.
*/
get target(): UsingTarget;
/**
* Returns the child node that has the label `global_keyword`.
*/
get globalKeyword(): TerminalNode | undefined;
/**
* Returns the child node that has the label `semicolon`.
*/
get semicolon(): TerminalNode;
}
/**
* This node represents a `UsingDeconstruction` nonterminal, with the following structure:
*
* ```ebnf
* (* Introduced in 0.8.13 *)
* UsingDeconstruction = (* open_brace: *) OPEN_BRACE
* (* symbols: *) UsingDeconstructionSymbols
* (* close_brace: *) CLOSE_BRACE;
* ```
*/
export declare class UsingDeconstruction {
/**
* The underlying nonterminal CST node of kind `UsingDeconstruction`.
*/
readonly cst: NonterminalNode;
private readonly fetch;
/**
* Constructs a new AST node of type `UsingDeconstruction`, given a nonterminal CST node of the same kind.
*/
constructor(
/**
* The underlying nonterminal CST node of kind `UsingDeconstruction`.
*/
cst: NonterminalNode);
/**
* Returns the child node that has the label `open_brace`.
*/
get openBrace(): TerminalNode;
/**
* Returns the child node that has the label `symbols`.
*/
get symbols(): UsingDeconstructionSymbols;
/**
* Returns the child node that has the label `close_brace`.
*/
get closeBrace(): TerminalNode;
}
/**
* This node represents a `UsingDeconstructionSymbol` nonterminal, with the following structure:
*
* ```ebnf
* (* Introduced in 0.8.13 *)
* UsingDeconstructionSymbol = (* name: *) IdentifierPath
* (* alias: *) UsingAlias?; (* Introduced in 0.8.19 *)
* ```
*/
export declare class UsingDeconstructionSymbol {
/**
* The underlying nonterminal CST node of kind `UsingDeconstructionSymbol`.
*/
readonly cst: NonterminalNode;
private readonly fetch;
/**
* Constructs a new AST node of type `UsingDeconstructionSymbol`, given a nonterminal CST node of the same kind.
*/
constructor(
/**
* The underlying nonterminal CST node of kind `UsingDeconstructionSymbol`.
*/
cst: NonterminalNode);
/**
* Returns the child node that has the label `name`.
*/
get name(): IdentifierPath;
/**
* Returns the child node that has the label `alias`.
*/
get alias(): UsingAlias | undefined;
}
/**
* This node represents a `UsingAlias` nonterminal, with the following structure:
*
* ```ebnf
* (* Introduced in 0.8.19 *)
* UsingAlias = (* as_keyword: *) AS_KEYWORD
* (* operator: *) UsingOperator;
* ```
*/
export declare class UsingAlias {
/**
* The underlying nonterminal CST node of kind `UsingAlias`.
*/
readonly cst: NonterminalNode;
private readonly fetch;
/**
* Constructs a new AST node of type `UsingAlias`, given a nonterminal CST node of the same kind.
*/
constructor(
/**
* The underlying nonterminal CST node of kind `UsingAlias`.
*/
cst: NonterminalNode);
/**
* Returns the child node that has the label `as_keyword`.
*/
get asKeyword(): TerminalNode;
/**
* Returns the child node that has the label `operator`.
*/
get operator(): UsingOperator;
}
/**
* This node represents a `ContractDefinition` nonterminal, with the following structure:
*
* ```ebnf
* ContractDefinition = (* abstract_keyword: *) ABSTRACT_KEYWORD? (* Introduced in 0.6.0 *)
* (* contract_keyword: *) CONTRACT_KEYWORD
* (* name: *) IDENTIFIER
* (* specifiers: *) ContractSpecifiers
* (* open_brace: *) OPEN_BRACE
* (* members: *) ContractMembers
* (* close_brace: *) CLOSE_BRACE;
* ```
*/
export declare class ContractDefinition {
/**
* The underlying nonterminal CST node of kind `ContractDefinition`.
*/
readonly cst: NonterminalNode;
private readonly fetch;
/**
* Constructs a new AST node of type `ContractDefinition`, given a nonterminal CST node of the same kind.
*/
constructor(
/**
* The underlying nonterminal CST node of kind `ContractDefinition`.
*/
cst: NonterminalNode);
/**
* Returns the child node that has the label `abstract_keyword`.
*/
get abstractKeyword(): TerminalNode | undefined;
/**
* Returns the child node that has the label `contract_keyword`.
*/
get contractKeyword(): TerminalNode;
/**
* Returns the child node that has the label `name`.
*/
get name(): TerminalNode;
/**
* Returns the child node that has the label `specifiers`.
*/
get specifiers(): ContractSpecifiers;
/**
* Returns the child node that has the label `open_brace`.
*/
get openBrace(): TerminalNode;
/**
* Returns the child node that has the label `members`.
*/
get members(): ContractMembers;
/**
* Returns the child node that has the label `close_brace`.
*/
get closeBrace(): TerminalNode;
}
/**
* This node represents a `InheritanceSpecifier` nonterminal, with the following structure:
*
* ```ebnf
* InheritanceSpecifier = (* is_keyword: *) IS_KEYWORD
* (* types: *) InheritanceTypes;
* ```
*/
export declare class InheritanceSpecifier {
/**
* The underlying nonterminal CST node of kind `InheritanceSpecifier`.
*/
readonly cst: NonterminalNode;
private readonly fetch;
/**
* Constructs a new AST node of type `InheritanceSpecifier`, given a nonterminal CST node of the same kind.
*/
constructor(
/**
* The underlying nonterminal CST node of kind `InheritanceSpecifier`.
*/
cst: NonterminalNode);
/**
* Returns the child node that has the label `is_keyword`.
*/
get isKeyword(): TerminalNode;
/**
* Returns the child node that has the label `types`.
*/
get types(): InheritanceTypes;
}
/**
* This node represents a `InheritanceType` nonterminal, with the following structure:
*
* ```ebnf
* InheritanceType = (* type_name: *) IdentifierPath
* (* arguments: *) ArgumentsDeclaration?;
* ```
*/
export declare class InheritanceType {
/**
* The underlying nonterminal CST node of kind `InheritanceType`.
*/
readonly cst: NonterminalNode;
private readonly fetch;
/**
* Constructs a new AST node of type `InheritanceType`, given a nonterminal CST node of the same kind.
*/
constructor(
/**
* The underlying nonterminal CST node of kind `InheritanceType`.
*/
cst: NonterminalNode);
/**
* Returns the child node that has the label `type_name`.
*/
get typeName(): IdentifierPath;
/**
* Returns the child node that has the label `arguments`.
*/
get arguments(): ArgumentsDeclaration | undefined;
}
/**
* This node represents a `StorageLayoutSpecifier` nonterminal, with the following structure:
*
* ```ebnf
* (* Introduced in 0.8.29 *)
* StorageLayoutSpecifier = (* layout_keyword: *) LAYOUT_KEYWORD
* (* at_keyword: *) AT_KEYWORD
* (* expression: *) Expression;
* ```
*/
export declare class StorageLayoutSpecifier {
/**
* The underlying nonterminal CST node of kind `StorageLayoutSpecifier`.
*/
readonly cst: NonterminalNode;
private readonly fetch;
/**
* Constructs a new AST node of type `StorageLayoutSpecifier`, given a nonterminal CST node of the same kind.
*/
constructor(
/**
* The underlying nonterminal CST node of kind `StorageLayoutSpecifier`.
*/
cst: NonterminalNode);
/**
* Returns the child node that has the label `layout_keyword`.
*/
get layoutKeyword(): TerminalNode;
/**
* Returns the child node that has the label `at_keyword`.
*/
get atKeyword(): TerminalNode;
/**
* Returns the child node that has the label `expression`.
*/
get expression(): Expression;
}
/**
* This node represents a `InterfaceDefinition` nonterminal, with the following structure:
*
* ```ebnf
* InterfaceDefinition = (* interface_keyword: *) INTERFACE_KEYWORD
* (* name: *) IDENTIFIER
* (* inheritance: *) InheritanceSpecifier?
* (* open_brace: *) OPEN_BRACE
* (* members: *) InterfaceMembers
* (* close_brace: *) CLOSE_BRACE;
* ```
*/
export declare class InterfaceDefinition {
/**
* The underlying nonterminal CST node of kind `InterfaceDefinition`.
*/
readonly cst: NonterminalNode;
private readonly fetch;
/**
* Constructs a new AST node of type `InterfaceDefinition`, given a nonterminal CST node of the same kind.
*/
constructor(
/**
* The underlying nonterminal CST node of kind `InterfaceDefinition`.
*/
cst: NonterminalNode);
/**
* Returns the child node that has the label `interface_keyword`.
*/
get interfaceKeyword(): TerminalNode;
/**
* Returns the child node that has the label `name`.
*/
get name(): TerminalNode;
/**
* Returns the child node that has the label `inheritance`.
*/
get inheritance(): InheritanceSpecifier | undefined;
/**
* Returns the child node that has the label `open_brace`.
*/
get openBrace(): TerminalNode;
/**
* Returns the child node that has the label `members`.
*/
get members(): InterfaceMembers;
/**
* Returns the child node that has the label `close_brace`.
*/
get closeBrace(): TerminalNode;
}
/**
* This node represents a `LibraryDefinition` nonterminal, with the following structure:
*
* ```ebnf
* LibraryDefinition = (* library_keyword: *) LIBRARY_KEYWORD
* (* name: *) IDENTIFIER
* (* open_brace: *) OPEN_BRACE
* (* members: *) LibraryMembers
* (* close_brace: *) CLOSE_BRACE;
* ```
*/
export declare class LibraryDefinition {
/**
* The underlying nonterminal CST node of kind `LibraryDefinition`.
*/
readonly cst: NonterminalNode;
private readonly fetch;
/**
* Constructs a new AST node of type `LibraryDefinition`, given a nonterminal CST node of the same kind.
*/
constructor(
/**
* The underlying nonterminal CST node of kind `LibraryDefinition`.
*/
cst: NonterminalNode);
/**
* Returns the child node that has the label `library_keyword`.
*/
get libraryKeyword(): TerminalNode;
/**
* Returns the child node that has the label `name`.
*/
get name(): TerminalNode;
/**
* Returns the child node that has the label `open_brace`.
*/
get openBrace(): TerminalNode;
/**
* Returns the child node that has the label `members`.
*/
get members(): LibraryMembers;
/**
* Returns the child node that has the label `close_brace`.
*/
get closeBrace(): TerminalNode;
}
/**
* This node represents a `StructDefinition` nonterminal, with the following structure:
*
* ```ebnf
* StructDefinition = (* struct_keyword: *) STRUCT_KEYWORD
* (* name: *) IDENTIFIER
* (* open_brace: *) OPEN_BRACE
* (* members: *) StructMembers
* (* close_brace: *) CLOSE_BRACE;
* ```
*/
export declare class StructDefinition {
/**
* The underlying nonterminal CST node of kind `StructDefinition`.
*/
readonly cst: NonterminalNode;
private readonly fetch;
/**
* Constructs a new AST node of type `StructDefinition`, given a nonterminal CST node of the same kind.
*/
constructor(
/**
* The underlying nonterminal CST node of kind `StructDefinition`.
*/
cst: NonterminalNode);
/**
* Returns the child node that has the label `struct_keyword`.
*/
get structKeyword(): TerminalNode;
/**
* Returns the child node that has the label `name`.
*/
get name(): TerminalNode;
/**
* Returns the child node that has the label `open_brace`.
*/
get openBrace(): TerminalNode;
/**
* Returns the child node that has the label `members`.
*/
get members(): StructMembers;
/**
* Returns the child node that has the label `close_brace`.
*/
get closeBrace(): TerminalNode;
}
/**
* This node represents a `StructMember` nonterminal, with the following structure:
*
* ```ebnf
* StructMember = (* type_name: *) TypeName
* (* name: *) IDENTIFIER
* (* semicolon: *) SEMICOLON;
* ```
*/
export declare class StructMember {
/**
* The underlying nonterminal CST node of kind `StructMember`.
*/
readonly cst: NonterminalNode;
private readonly fetch;
/**
* Constructs a new AST node of type `StructMember`, given a nonterminal CST node of the same kind.
*/
constructor(
/**
* The underlying nonterminal CST node of kind `StructMember`.
*/
cst: NonterminalNode);
/**
* Returns the child node that has the label `type_name`.
*/
get typeName(): TypeName;
/**
* Returns the child node that has the label `name`.
*/
get name(): TerminalNode;
/**
* Returns the child node that has the label `semicolon`.
*/
get semicolon(): TerminalNode;
}
/**
* This node represents a `EnumDefinition` nonterminal, with the following structure:
*
* ```ebnf
* EnumDefinition = (* enum_keyword: *) ENUM_KEYWORD
* (* name: *) IDENTIFIER
* (* open_brace: *) OPEN_BRACE
* (* members: *) EnumMembers
* (* close_brace: *) CLOSE_BRACE;
* ```
*/
export declare class EnumDefinition {
/**
* The underlying nonterminal CST node of kind `EnumDefinition`.
*/
readonly cst: NonterminalNode;
private readonly fetch;
/**
* Constructs a new AST node of type `EnumDefinition`, given a nonterminal CST node of the same kind.
*/
constructor(
/**
* The underlying nonterminal CST node of kind `EnumDefinition`.
*/
cst: NonterminalNode);
/**
* Returns the child node that has the label `enum_keyword`.
*/
get enumKeyword(): TerminalNode;
/**
* Returns the child node that has the label `name`.
*/
get name(): TerminalNode;
/**
* Returns the child node that has the label `open_brace`.
*/
get openBrace(): TerminalNode;
/**
* Returns the child node that has the label `members`.
*/
get members(): EnumMembers;
/**
* Returns the child node that has the label `close_brace`.
*/
get closeBrace(): TerminalNode;
}
/**
* This node represents a `ConstantDefinition` nonterminal, with the following structure:
*
* ```ebnf
* (* Introduced in 0.7.4 *)
* ConstantDefinition = (* type_name: *) TypeName
* (* constant_keyword: *) CONSTANT_KEYWORD
* (* name: *) IDENTIFIER
* (* equal: *) EQUAL
* (* value: *) Expression
* (* semicolon: *) SEMICOLON;
* ```
*/
export declare class ConstantDefinition {
/**
* The underlying nonterminal CST node of kind `ConstantDefinition`.
*/
readonly cst: NonterminalNode;
private readonly fetch;
/**
* Constructs a new AST node of type `ConstantDefinition`, given a nonterminal CST node of the same kind.
*/
constructor(
/**
* The underlying nonterminal CST node of kind `ConstantDefinition`.
*/
cst: NonterminalNode);
/**
* Returns the child node that has the label `type_name`.
*/
get typeName(): TypeName;
/**
* Returns the child node that has the label `constant_keyword`.
*/
get constantKeyword(): TerminalNode;
/**
* Returns the child node that has the label `name`.
*/
get name(): TerminalNode;
/**
* Returns the child node that has the label `equal`.
*/
get equal(): TerminalNode;
/**
* Returns the child node that has the label `value`.
*/
get value(): Expression;
/**
* Returns the child node that has the label `semicolon`.
*/
get semicolon(): TerminalNode;
}
/**
* This node represents a `StateVariableDefinition` nonterminal, with the following structure:
*
* ```ebnf
* StateVariableDefinition = (* type_name: *) TypeName
* (* attributes: *) StateVariableAttributes
* (* name: *) IDENTIFIER
* (* value: *) StateVariableDefinitionValue?
* (* semicolon: *) SEMICOLON;
* ```
*/
export declare class StateVariableDefinition {
/**
* The underlying nonterminal CST node of kind `StateVariableDefinition`.
*/
readonly cst: NonterminalNode;
private readonly fetch;
/**
* Constructs a new AST node of type `StateVariableDefinition`, given a nonterminal CST node of the same kind.
*/
constructor(
/**
* The underlying nonterminal CST node of kind `StateVariableDefinition`.
*/
cst: NonterminalNode);
/**
* Returns the child node that has the label `type_name`.
*/
get typeName(): TypeName;
/**
* Returns the child node that has the label `attributes`.
*/
get attributes(): StateVariableAttributes;
/**
* Returns the child node that has the label `name`.
*/
get name(): TerminalNode;
/**
* Returns the child node that has the label `value`.
*/
get value(): StateVariableDefinitionValue | undefined;
/**
* Returns the child node that has the label `semicolon`.
*/
get semicolon(): TerminalNode;
}
/**
* This node represents a `StateVariableDefinitionValue` nonterminal, with the following structure:
*
* ```ebnf
* StateVariableDefinitionValue = (* equal: *) EQUAL
* (* value: *) Expression;
* ```
*/
export declare class StateVariableDefinitionValue {
/**
* The underlying nonterminal CST node of kind `StateVariableDefinitionValue`.
*/
readonly cst: NonterminalNode;
private readonly fetch;
/**
* Constructs a new AST node of type `StateVariableDefinitionValue`, given a nonterminal CST node of the same kind.
*/
constructor(
/**
* The underlying nonterminal CST node of kind `StateVariableDefinitionValue`.
*/
cst: NonterminalNode);
/**
* Returns the child node that has the label `equal`.
*/
get equal(): TerminalNode;
/**
* Returns the child node that has the label `value`.
*/
get value(): Expression;
}
/**
* This node represents a `FunctionDefinition` nonterminal, with the following structure:
*
* ```ebnf
* FunctionDefinition = (* function_keyword: *) FUNCTION_KEYWORD
* (* name: *) FunctionName
* (* parameters: *) ParametersDeclaration
* (* attributes: *) FunctionAttributes
* (* returns: *) ReturnsDeclaration?
* (* body: *) FunctionBody;
* ```
*/
export declare class FunctionDefinition {
/**
* The underlying nonterminal CST node of kind `FunctionDefinition`.
*/
readonly cst: NonterminalNode;
private readonly fetch;
/**
* Constructs a new AST node of type `FunctionDefinition`, given a nonterminal CST node of the same kind.
*/
constructor(
/**
* The underlying nonterminal CST node of kind `FunctionDefinition`.
*/
cst: NonterminalNode);
/**
* Returns the child node that has the label `function_keyword`.
*/
get functionKeyword(): TerminalNode;
/**
* Returns the child node that has the label `name`.
*/
get name(): FunctionName;
/**
* Returns the child node that has the label `parameters`.
*/
get parameters(): ParametersDeclaration;
/**
* Returns the child node that has the label `attributes`.
*/
get attributes(): FunctionAttributes;
/**
* Returns the child node that has the label `returns`.
*/
get returns(): ReturnsDeclaration | undefined;
/**
* Returns the child node that has the label `body`.
*/
get body(): FunctionBody;
}
/**
* This node represents a `ParametersDeclaration` nonterminal, with the following structure:
*
* ```ebnf
* ParametersDeclaration = (* open_paren: *) OPEN_PAREN
* (* parameters: *) Parameters
* (* close_paren: *) CLOSE_PAREN;
* ```
*/
export declare class ParametersDeclaration {
/**
* The underlying nonterminal CST node of kind `ParametersDeclaration`.
*/
readonly cst: NonterminalNode;
private readonly fetch;
/**
* Constructs a new AST node of type `ParametersDeclaration`, given a nonterminal CST node of the same kind.
*/
constructor(
/**
* The underlying nonterminal CST node of kind `ParametersDeclaration`.
*/
cst: NonterminalNode);
/**
* Returns the child node that has the label `open_paren`.
*/
get openParen(): TerminalNode;
/**
* Returns the child node that has the label `parameters`.
*/
get parameters(): Parameters;
/**
* Returns the child node that has the label `close_paren`.
*/
get closeParen(): TerminalNode;
}
/**
* This node represents a `Parameter` nonterminal, with the following structure:
*
* ```ebnf
* Parameter = (* type_name: *) TypeName
* (* storage_location: *) StorageLocation?
* (* name: *) IDENTIFIER?;
* ```
*/
export declare class Parameter {
/**
* The underlying nonterminal CST node of kind `Parameter`.
*/
readonly cst: NonterminalNode;
private readonly fetch;
/**
* Constructs a new AST node of type `Parameter`, given a nonterminal CST node of the same kind.
*/
constructor(
/**
* The underlying nonterminal CST node of kind `Parameter`.
*/
cst: NonterminalNode);
/**
* Returns the child node that has the label `type_name`.
*/
get typeName(): TypeName;
/**
* Returns the child node that has the label `storage_location`.
*/
get storageLocation(): StorageLocation | undefined;
/**
* Returns the child node that has the label `name`.
*/
get name(): TerminalNode | undefined;
}
/**
* This node represents a `OverrideSpecifier` nonterminal, with the following structure:
*
* ```ebnf
* (* Introduced in 0.6.0 *)
* OverrideSpecifier = (* override_keyword: *) OVERRIDE_KEYWORD
* (* overridden: *) OverridePathsDeclaration?;
* ```
*/
export declare class OverrideSpecifier {
/**
* The underlying nonterminal CST node of kind `OverrideSpecifier`.
*/
readonly cst: NonterminalNode;
private readonly fetch;
/**
* Constructs a new AST node of type `OverrideSpecifier`, given a nonterminal CST node of the same kind.
*/
constructor(
/**
* The underlying nonterminal CST node of kind `OverrideSpecifier`.
*/
cst: NonterminalNode);
/**
* Returns the child node that has the label `override_keyword`.
*/
get overrideKeyword(): TerminalNode;
/**
* Returns the child node that has the label `overridden`.
*/
get overridden(): OverridePathsDeclaration | undefined;
}
/**
* This node represents a `OverridePathsDeclaration` nonterminal, with the following structure:
*
* ```ebnf
* (* Introduced in 0.6.0 *)
* OverridePathsDeclaration = (* open_paren: *) OPEN_PAREN
* (* paths: *) OverridePaths
* (* close_paren: *) CLOSE_PAREN;
* ```
*/
export declare class OverridePathsDeclaration {
/**
* The underlying nonterminal CST node of kind `OverridePathsDeclaration`.
*/
readonly cst: NonterminalNode;
private readonly fetch;
/**
* Constructs a new AST node of type `OverridePathsDeclaration`, given a nonterminal CST node of the same kind.
*/
constructor(
/**
* The underlying nonterminal CST node of kind `OverridePathsDeclaration`.
*/
cst: NonterminalNode);
/**
* Returns the child node that has the label `open_paren`.
*/
get openParen(): TerminalNode;
/**
* Returns the child node that has the label `paths`.
*/
get paths(): OverridePaths;
/**
* Returns the child node that has the label `close_paren`.
*/
get closeParen(): TerminalNode;
}
/**
* This node represents a `ReturnsDeclaration` nonterminal, with the following structure:
*
* ```ebnf
* ReturnsDeclaration = (* returns_keyword: *) RETURNS_KEYWORD
* (* variables: *) ParametersDeclaration;
* ```
*/
export declare class ReturnsDeclaration {
/**
* The underlying nonterminal CST node of kind `ReturnsDeclaration`.
*/
readonly cst: NonterminalNode;
private readonly fetch;
/**
* Constructs a new AST node of type `ReturnsDeclaration`, given a nonterminal CST node of the same kind.
*/
constructor(
/**
* The underlying nonterminal CST node of kind `ReturnsDeclaration`.
*/
cst: NonterminalNode);
/**
* Returns the child node that has the label `returns_keyword`.
*/
get returnsKeyword(): TerminalNode;
/**
* Returns the child node that has the label `variables`.
*/
get variables(): ParametersDeclaration;
}
/**
* This node represents a `ConstructorDefinition` nonterminal, with the following structure:
*
* ```ebnf
* (* Introduced in 0.4.22 *)
* ConstructorDefinition = (* constructor_keyword: *) CONSTRUCTOR_KEYWORD
* (* parameters: *) ParametersDeclaration
* (* attributes: *) ConstructorAttributes
* (* body: *) Block;
* ```
*/
export declare class ConstructorDefinition {
/**
* The underlying nonterminal CST node of kind `ConstructorDefinition`.
*/
readonly cst: NonterminalNode;
private readonly fetch;
/**
* Constructs a new AST node of type `ConstructorDefinition`, given a nonterminal CST node of the same kind.
*/
constructor(
/**
* The underlying nonterminal CST node of kind `ConstructorDefinition`.
*/
cst: NonterminalNode);
/**
* Returns the child node that has the label `constructor_keyword`.
*/
get constructorKeyword(): TerminalNode;
/**
* Returns the child node that has the label `parameters`.
*/
get parameters(): ParametersDeclaration;
/**
* Returns the child node that has the label `attributes`.
*/
get attributes(): ConstructorAttributes;
/**
* Returns the child node that has the label `body`.
*/
get body(): Block;
}
/**
* This node represents a `UnnamedFunctionDefinition` nonterminal, with the following structure:
*
* ```ebnf
* (* Deprecated in 0.6.0 *)
* UnnamedFunctionDefinition = (* function_keyword: *) FUNCTION_KEYWORD
* (* parameters: *) ParametersDeclaration
* (* attributes: *) UnnamedFunctionAttributes
* (* body: *) FunctionBody;
* ```
*/
export declare class UnnamedFunctionDefinition {
/**
* The underlying nonterminal CST node of kind `UnnamedFunctionDefinition`.
*/
readonly cst: NonterminalNode;
private readonly fetch;
/**
* Constructs a new AST node of type `UnnamedFunctionDefinition`, given a nonterminal CST node of the same kind.
*/
constructor(
/**
* The underlying nonterminal CST node of kind `UnnamedFunctionDefinition`.
*/
cst: NonterminalNode);
/**
* Returns the child node that has the label `function_keyword`.
*/
get functionKeyword(): TerminalNode;
/**
* Returns the child node that has the label `parameters`.
*/
get parameters(): ParametersDeclaration;
/**
* Returns the child node that has the label `attributes`.
*/
get attributes(): UnnamedFunctionAttributes;
/**
* Returns the child node that has the label `body`.
*/
get body(): FunctionBody;
}
/**
* This node represents a `FallbackFunctionDefinition` nonterminal, with the following structure:
*
* ```ebnf
* (* Introduced in 0.6.0 *)
* FallbackFunctionDefinition = (* fallback_keyword: *) FALLBACK_KEYWORD
* (* parameters: *) ParametersDeclaration
* (* attributes: *) FallbackFunctionAttributes
* (* returns: *) ReturnsDeclaration?
* (* body: *) FunctionBody;
* ```
*/
export declare class FallbackFunctionDefinition {
/**
* The underlying nonterminal CST node of kind `FallbackFunctionDefinition`.
*/
readonly cst: NonterminalNode;
private readonly fetch;
/**
* Constructs a new AST node of type `FallbackFunctionDefinition`, given a nonterminal CST node of the same kind.
*/
constructor(
/**
* The underlying nonterminal CST node of kind `FallbackFunctionDefinition`.
*/
cst: NonterminalNode);
/**
* Returns the child node that has the label `fallback_keyword`.
*/
get fallbackKeyword(): TerminalNode;
/**
* Returns the child node that has the label `parameters`.
*/
get parameters(): ParametersDeclaration;
/**
* Returns the child node that has the label `attributes`.
*/
get attributes(): FallbackFunctionAttributes;
/**
* Returns the child node that has the label `returns`.
*/
get returns(): ReturnsDeclaration | undefined;
/**
* Returns the child node that has the label `body`.
*/
get body(): FunctionBody;
}
/**
* This node represents a `ReceiveFunctionDefinition` nonterminal, with the following structure:
*
* ```ebnf
* (* Introduced in 0.6.0 *)
* ReceiveFunctionDefinition = (* receive_keyword: *) RECEIVE_KEYWORD
* (* parameters: *) ParametersDeclaration
* (* attributes: *) ReceiveFunctionAttributes
* (* body: *) FunctionBody;
* ```
*/
export declare class ReceiveFunctionDefinition {
/**
* The underlying nonterminal CST node of kind `ReceiveFunctionDefinition`.
*/
readonly cst: NonterminalNode;
private readonly fetch;
/**
* Constructs a new AST node of type `ReceiveFunctionDefinition`, given a nonterminal CST node of the same kind.
*/
constructor(
/**
* The underlying nonterminal CST node of kind `ReceiveFunctionDefinition`.
*/
cst: NonterminalNode);
/**
* Returns the child node that has the label `receive_keyword`.
*/
get receiveKeyword(): TerminalNode;
/**
* Returns the child node that has the label `parameters`.
*/
get parameters(): ParametersDeclaration;
/**
* Returns the child node that has the label `attributes`.
*/
get attributes(): ReceiveFunctionAttributes;
/**
* Returns the child node that has the label `body`.
*/
get body(): FunctionBody;
}
/**
* This node represents a `ModifierDefinition` nonterminal, with the following structure:
*
* ```ebnf
* ModifierDefinition = (* modifier_keyword: *) MODIFIER_KEYWORD
* (* name: *) IDENTIFIER
* (* parameters: *) ParametersDeclaration?
* (* attributes: *) ModifierAttributes
* (* body: *) FunctionBody;
* ```
*/
export declare class ModifierDefinition {
/**
* The underlying nonterminal CST node of kind `ModifierDefinition`.
*/
readonly cst: NonterminalNode;
private readonly fetch;
/**
* Constructs a new AST node of type `ModifierDefinition`, given a nonterminal CST node of the same kind.
*/
constructor(
/**
* The underlying nonterminal CST node of kind `ModifierDefinition`.
*/
cst: NonterminalNode);
/**
* Returns the child node that has the label `modifier_keyword`.
*/
get modifierKeyword(): TerminalNode;
/**
* Returns the child node that has the label `name`.
*/
get name(): TerminalNode;
/**
* Returns the child node that has the label `parameters`.
*/
get parameters(): ParametersDeclaration | undefined;
/**
* Returns the child node that has the label `attributes`.
*/
get attributes(): ModifierAttributes;
/**
* Returns the child node that has the label `body`.
*/
get body(): FunctionBody;
}
/**
* This node represents a `ModifierInvocation` nonterminal, with the following structure:
*
* ```ebnf
* ModifierInvocation = (* name: *) IdentifierPath
* (* arguments: *) ArgumentsDeclaration?;
* ```
*/
export declare class ModifierInvocation {
/**
* The underlying nonterminal CST node of kind `ModifierInvocation`.
*/
readonly cst: NonterminalNode;
private readonly fetch;
/**
* Constructs a new AST node of type `ModifierInvocation`, given a nonterminal CST node of the same kind.
*/
constructor(
/**
* The underlying nonterminal CST node of kind `ModifierInvocation`.
*/
cst: NonterminalNode);
/**
* Returns the child node that has the label `name`.
*/
get name(): IdentifierPath;
/**
* Returns the child node that has the label `arguments`.
*/
get arguments(): ArgumentsDeclaration | undefined;
}
/**
* This node represents a `EventDefinition` nonterminal, with the following structure:
*
* ```ebnf
* EventDefinition = (* event_keyword: *) EVENT_KEYWORD
* (* name: *) IDENTIFIER
* (* parameters: *) EventParametersDeclaration
* (* anonymous_keyword: *) ANONYMOUS_KEYWORD?
* (* semicolon: *) SEMICOLON;
* ```
*/
export declare class EventDefinition {
/**
* The underlying nonterminal CST node of kind `EventDefinition`.
*/
readonly cst: NonterminalNode;
private readonly fetch;
/**
* Constructs a new AST node of type `EventDefinition`, given a nonterminal CST node of the same kind.
*/
constructor(
/**
* The underlying nonterminal CST node of kind `EventDefinition`.
*/
cst: NonterminalNode);
/**
* Returns the child node that has the label `event_keyword`.
*/
get eventKeyword(): TerminalNode;
/**
* Returns the child node that has the label `name`.
*/
get name(): TerminalNode;
/**
* Returns the child node that has the label `parameters`.
*/
get parameters(): EventParametersDeclaration;
/**
* Returns the child node that has the label `anonymous_keyword`.
*/
get anonymousKeyword(): TerminalNode | undefined;
/**
* Returns the child node that has the label `semicolon`.
*/
get semicolon(): TerminalNode;
}
/**
* This node represents a `EventParametersDeclaration` nonterminal, with the following structure:
*
* ```ebnf
* EventParametersDeclaration = (* open_paren: *) OPEN_PAREN
* (* parameters: *) EventParameters
* (* close_paren: *) CLOSE_PAREN;
* ```
*/
export declare class EventParametersDeclaration {
/**
* The underlying nonterminal CST node of kind `EventParametersDeclaration`.
*/
readonly cst: NonterminalNode;
private readonly fetch;
/**
* Constructs a new AST node of type `Ev