ExpressionCollectingObjectTreeParser
final class ExpressionCollectingObjectTreeParser extends ObjectTreeParser (View source)
| internal |
Properties
| protected Lexer | $lexer | from ObjectTreeParser | |
| protected string|null | $contextPathAndFilename | from ObjectTreeParser |
Methods
Checks, if the token type matches the current, if so consume it and return true.
OptionalSmallGap = ( SPACE / SLASH_COMMENT / HASH_COMMENT / MULTILINE_COMMENT )*
StatementList = ( Statement )*
Statement = IncludeStatement / ObjectStatement
IncludeStatement = INCLUDE ( STRING / CHAR / FILE_PATTERN ) EndOfStatement
ObjectStatement = ObjectPath ( ValueAssignment / ValueUnset / ValueCopy )? ( Block / EndOfStatement )
PathSegment = ( PROTOTYPE_START FUSION_OBJECT_NAME ')' / OBJECT_PATH_PART / '@' OBJECT_PATH_PART / STRING / CHAR )
No description
No description
AssignedObjectPath = '.'? ObjectPath
No description
No description
Details
protected
__construct(Lexer $lexer, string|null $contextPathAndFilename)
No description
static FusionFile
parse(FusionSourceCode $fusionCode)
No description
protected Token
consume()
Consume the current token.
Can only consume if accept was called before.
protected bool
accept(int $tokenType)
Accepts a token of a given type.
The Lexer will look up the regex for the token and try to match it on the current string. First match wins.
protected Token
expect(int $tokenType)
Expects a token of a given type.
The Lexer will look up the regex for the token and try to match it on the current string. First match wins.
protected bool
lazyExpect(int $tokenType)
Checks, if the token type matches the current, if so consume it and return true.
protected void
lazyBigGap()
OptionalBigGap = ( NEWLINE / OptionalSmallGap )*
protected void
lazySmallGap()
OptionalSmallGap = ( SPACE / SLASH_COMMENT / HASH_COMMENT / MULTILINE_COMMENT )*
protected FusionFile
parseFusionFile()
FusionFile = StatementList
protected StatementList
parseStatementList(int|null $stopLookahead = null)
StatementList = ( Statement )*
protected AbstractStatement
parseStatement()
Statement = IncludeStatement / ObjectStatement
protected IncludeStatement
parseIncludeStatement()
IncludeStatement = INCLUDE ( STRING / CHAR / FILE_PATTERN ) EndOfStatement
protected ObjectStatement
parseObjectStatement()
ObjectStatement = ObjectPath ( ValueAssignment / ValueUnset / ValueCopy )? ( Block / EndOfStatement )
protected ObjectPath
parseObjectPath()
ObjectPath = PathSegment ( '.' PathSegment )*
protected AbstractPathSegment
parsePathSegment()
PathSegment = ( PROTOTYPE_START FUSION_OBJECT_NAME ')' / OBJECT_PATH_PART / '@' OBJECT_PATH_PART / STRING / CHAR )
protected ValueAssignment
parseValueAssignment()
ValueAssignment = ASSIGNMENT PathValue
protected AbstractPathValue
parsePathValue()
No description
protected DslExpressionValue
parseDslExpression()
No description
protected ValueUnset
parseValueUnset()
ValueUnset = UNSET
protected ValueCopy
parseValueCopy()
ValueCopy = COPY ObjectPathAssignment
protected AssignedObjectPath
parseAssignedObjectPath()
AssignedObjectPath = '.'? ObjectPath
protected Block
parseBlock()
Block: = '{' StatementList? '}'
protected void
parseEndOfStatement()
EndOfStatement = ( EOF / NEWLINE )
protected ParserException
prepareParserException(ParserException $parserException)
No description
static EelExpressionPositions
findEelExpressions(string $sourceCode, string|null $contextPathAndFilename = null)
No description
static array
findAfxExpressions(string $sourceCode, string|null $contextPathAndFilename = null)
No description