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)
            });
Exemple #2
0
 public virtual void Visit(IIdentifierToken t)
 {
 }
 public void Visit(IIdentifierToken token)
 {
     SpannedFilteredWhite("identifer", token);
 }
 public virtual void Visit(IIdentifierToken t)
 {
 }
 public void Visit(IIdentifierToken t)
 {
     identifier_count++;
 }
 public void Visit(IIdentifierToken token)
 {
     SpannedFilteredWhite("identifier", token);
 }
Exemple #7
0
 public void Visit(IIdentifierToken token)
 {
     Write(token, Color.Black);
 }
 public virtual void Visit(IIdentifierToken t)
 {
     //throw new System.NotImplementedException();
 }