Exemplo n.º 1
0
		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);
		}
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
		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"
			};
		}