Changeset 113

Show
Ignore:
Timestamp:
09/14/07 02:17:15 (1 year ago)
Author:
Don Clugston
Message:

Removed misleading comments.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/blade/SyntaxTree.d

    r110 r113  
    1313* associativity information. The inner mixin determines the type and value 
    1414* of each symbol in the expression, by mixing in '.stringof' expressions. 
     15* The '.stringof' property is a very powerful language feature which allows 
     16* us to probe the compiler's symbol table. Because it can be applied to any 
     17* expression or type, we can get away with a very rudimentary lexer. 
    1518* The two levels of mixins are required because of some quirks in the behaviour 
    1619* of stringof. 
     
    8891bool isKeyword(char [] text) { 
    8992    char [][] keywords = [ 
    90     "abstract", "alias", "align", "asm", "assert", "auto", 
    91     "body", "bool", "break", "byte", 
    92     "case", "cast", "catch", "cdouble", "cent", "cfloat", 
    93     "char", "class", "const", "continue", "creal",  
    94     "dchar", "debug", "default", "delegate", "delete", "deprecated", 
    95     "do", "double", 
    96     "else", "enum", "export", "extern", 
    97     "false", "final", "finally", "float", "for", 
    98     "foreach", "foreach_reverse", "function", 
    99     "goto", 
    100     "idouble", "if", "ifloat", "import", "in", "inout", 
    101     "int", "interface", "invariant", "ireal", "is", 
    102     "lazy", "long", "macro", "mixin", "module", 
    103     "new", "null", "out", "override", 
    104     "package", "pragma", "private", "protected", "public", 
    105     "real", "ref", "return", 
    106     "scope", "short", "static", "struct", "super", "switch", "synchronized", 
    107     "template", "this", "throw", "__traits", "true", "try", 
    108     "typedef", "typeid", "typeof", 
    109     "ubyte", "ucent", "uint", "ulong", "union", "unittest", "ushort", 
    110     "version", "void", "volatile", "wchar", "while", "with"]; 
     93    "abstract", "alias", "align", "asm", "assert", "auto", "body", "bool", 
     94    "break", "byte", "case", "cast", "catch", "cdouble", "cent", "cfloat", 
     95    "char", "class", "const", "continue", "creal", "dchar", "debug", "default", 
     96    "delegate", "delete", "deprecated", "do", "double", "else", "enum", 
     97    "export", "extern", "false", "final", "finally", "float", "for", "foreach", 
     98    "foreach_reverse", "function", "goto", "idouble", "if", "ifloat", "import", 
     99    "in", "inout", "int", "interface", "invariant", "ireal", "is", "lazy",  
     100    "long", "macro", "mixin", "module", "new", "null", "out", "override", 
     101    "package", "pragma", "private", "protected", "public", "real", "ref", 
     102    "return", "scope", "short", "static", "struct", "super", "switch", 
     103    "synchronized", "template", "this", "throw", "__traits", "true", "try", 
     104    "typedef", "typeid", "typeof", "ubyte", "ucent", "uint", "ulong", "union", 
     105    "unittest", "ushort",  "version", "void",  
     106    "volatile", "wchar", "while", "with"]; 
    111107     
    112108    foreach(char [] s; keywords) { 
     
    328324    char [] expr = expression; 
    329325    char [][] symbols = replaceSymbolsWithPlaceholders(expr); 
    330     // Creates an array[2] of string literals, where [0] is the type, and [1] is the value 
    331     // This is passed to the toSymTable function which determines which entries are constants. 
    332326    char [] result = `AbstractSyntaxTree("` ~ exprWithPlaceholders ~ `",[`; 
    333327    for(int i=0; i<symbols.length; ++i) {