C# Class Shovel.Compiler.Parser

Show file Open project: mbrezu/Shovel Class Usage Examples

Public Methods

Method Description
Parser ( List tokens, List sources ) : System

Private Methods

Method Description
ConsumeToken ( Token type, string content ) : void
CurrentToken ( ) : Token
Finished ( ) : bool
GetFalseParseTree ( ) : ParseTree
GetNullParseTree ( ) : ParseTree
GetPosition ( int pos ) : Position
GetSourceFile ( ) : SourceFile
GetTrueParseTree ( ) : ParseTree
IsRequiredPrimitiveCall ( ParseTree parseTree, string opName ) : bool
IsWeave ( ParseTree source ) : bool
LastToken ( ) : Token
LeftAssoc ( Func subParser, bool>.Func predicate, ParseTree>.Func postProcessor = null ) : ParseTree
MakePrim0ParseTree ( string primitiveName ) : ParseTree
MaybeRewriteAsIfExpression ( ParseTree parseTree, string opName, Func ifChildren ) : ParseTree
NextToken ( ) : void
Parse ( ) : List
ParseAdditionTerm ( ) : ParseTree
ParseAndTerm ( ) : ParseTree
ParseAssignment ( ParseTree expr ) : ParseTree
ParseAtomish ( ) : ParseTree
ParseBlock ( ) : ParseTree
ParseBlockReturn ( ) : ParseTree
ParseBool ( ) : ParseTree
ParseContext ( ) : ParseTree
ParseExpression ( ) : ParseTree
ParseIdentifierOrCallOrRef ( ParseTree forcedStart = null ) : ParseTree
ParseIf ( ) : ParseTree
ParseInterpolate ( String content, int startPos, int endPos, int intStart ) : ParseTree
ParseLambda ( ) : ParseTree
ParseLambdaArgs ( ) : ParseTree
ParseList ( Func itemParser, String>.Tuple openParen, String>.Tuple sep, String>.Tuple closeParen ) : IEnumerable
ParseLiteralString ( String content, int startPos, int endPos ) : ParseTree
ParseLogicalNot ( ) : ParseTree
ParseMultiplicationTerm ( ) : ParseTree
ParseName ( bool canBeRequiredPrimitive = true ) : ParseTree
ParseNameAsString ( ) : ParseTree
ParseNumber ( ) : ParseTree
ParseOrTerm ( ) : ParseTree
ParseParenthesizedOrName ( ) : ParseTree
ParsePostfixTerm ( ) : ParseTree
ParsePrimitive ( ) : ParseTree
ParseRelationalTerm ( ) : ParseTree
ParseStatement ( ) : ParseTree
ParseUnaryMinus ( ) : ParseTree
ParseVarDeclaration ( ) : ParseTree
ParseVoid ( ) : ParseTree
PostProcessLogicalAnd ( ParseTree arg ) : ParseTree
PostProcessLogicalOr ( ParseTree arg ) : ParseTree
RaiseError ( string message ) : void
RaiseErrorAt ( string message, int startPosition, int endPosition ) : void
ReplacePlaceholder ( ParseTree source, ParseTree replacement, Utils count ) : ParseTree
RequireToken ( ) : void
RequireTokenError ( IEnumerable types, IEnumerable contents, Token actualToken ) : void
RequireTokenExactly ( Token type, string content ) : void
RequireTokenType ( Token type ) : void
RunWeaveMacro ( ParseTree source ) : ParseTree
TokenAsParseTree ( ParseTree prim0 ) : ParseTree
TokenIs ( Token type, string content = null ) : bool
WithAnchoredParseTree ( int startPos, ParseTree label, Action action ) : ParseTree
WithNewParseTree ( ParseTree label, Action action ) : ParseTree

Method Details

Parser() public method

public Parser ( List tokens, List sources ) : System
tokens List
sources List
return System