示例#1
0
        public bool ISmatch(TINY_Token_Class ExpectedToken, int tk_index)
        {
            TINY_Token CurrentToken = new TINY_Token();

            if (tk_index < TokenStream.Count)
            {
                CurrentToken = TokenStream[tk_index];
            }
            if (CurrentToken.token_type == ExpectedToken)
            {
                return(true);
            }
            return(false);
        }
示例#2
0
        public Node match(TINY_Token_Class ExpectedToken)
        {
            TINY_Token CurrentToken = new TINY_Token();

            if (tokenIndex < TokenStream.Count)
            {
                CurrentToken = TokenStream[tokenIndex];
            }
            if (CurrentToken.token_type == ExpectedToken)
            {
                Node node = new Node(CurrentToken.lex);
                tokenIndex++;
                return(node);
            }
            return(null);
        }
示例#3
0
 public Node match(TINY_Token_Class ExpectedToken)
 {
     return(null);
 }