コード例 #1
0
ファイル: RantCompiler.cs プロジェクト: katnapper323/Rant
		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);
		}
コード例 #2
0
ファイル: RantCompiler.cs プロジェクト: W-h-a-t-s/Rant
        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);
        }
コード例 #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"
			};
		}