private RantCompiler(string sourceName, string source) { _sourceName = sourceName; _source = source; _reader = new TokenReader(sourceName, RantLexer.GenerateTokens(sourceName, source.ToStringe())); _expressionCompiler = new RantExpressionCompiler(sourceName, source, _reader, this); }
public RantCompiler(string sourceName, string source) { Module = new RantModule(sourceName); this.source = source; this.sourceName = sourceName; reader = new TokenReader(sourceName, RantLexer.GenerateTokens(sourceName, source.ToStringe())); expressionCompiler = new RantExpressionCompiler(sourceName, source, reader, this); Parselet.SetCompilerAndReader(this, reader); }
public RantExpressionCompiler(string sourceName, string source, TokenReader reader, RantCompiler parentCompiler) { _rantCompiler = parentCompiler; _sourceName = sourceName; _source = source; _reader = reader; _keywords = new List<string>() { "var", "function", "true", "false", "no", "maybe", "list", "if", "return", "while", "break", "for" }; }