public static PsuedoToken For(IToken token, CodeText code)
        {
            var tokenType = token.GetType();
            var text      = token.Text(code);

            return(token switch
            {
                IIdentifierToken identifier => new PsuedoToken(tokenType, text, identifier.Value),
                IStringLiteralToken stringLiteral => new PsuedoToken(tokenType, text, stringLiteral.Value),
                IIntegerLiteralToken integerLiteral => new PsuedoToken(tokenType, text, integerLiteral.Value),
                _ => new PsuedoToken(tokenType, text)
            });
示例#2
0
 public virtual void Visit(IIdentifierToken t)
 {
 }
示例#3
0
 public void Visit(IIdentifierToken token)
 {
     SpannedFilteredWhite("identifer", token);
 }
示例#4
0
 public virtual void Visit(IIdentifierToken t)
 {
 }
 public void Visit(IIdentifierToken t)
 {
     identifier_count++;
 }
 public void Visit(IIdentifierToken token)
 {
     SpannedFilteredWhite("identifier", token);
 }
示例#7
0
 public void Visit(IIdentifierToken token)
 {
     Write(token, Color.Black);
 }
 public virtual void Visit(IIdentifierToken t)
 {
     //throw new System.NotImplementedException();
 }