Changeset 1569 for cobra/trunk/Source/CobraParser.cobra
- Timestamp:
- 08/06/08 02:23:08 (5 months ago)
- Files:
-
- 1 modified
-
cobra/trunk/Source/CobraParser.cobra (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cobra/trunk/Source/CobraParser.cobra
r1564 r1569 522 522 isGood = false 523 523 if not isGood 524 sugg = Compiler.suggestionFor(tok.text)524 sugg = if(tok.text.length, Compiler.suggestionFor(tok.text), nil) 525 525 sugg = if(sugg, ' Try "[sugg]".', '') 526 526 .throwError('Expecting use, assembly, namespace, class, interface or enum, but got [tok].[sugg]') … … 543 543 # TODO: throw AssertException(SourceSite sourceSite, object[] expressions, object thiss, object info) 544 544 assert false, IdentifierExpr(token, 'throw') 545 on 'number' 546 # number 'decimal' | 'float' | 'float32' | 'float64' 547 typeName = .grab 548 if typeName.text not in ['decimal', 'float', 'float32', 'float64'] 549 .throwError('Compiler directive "number": unrecognized type "[typeName.text]". Must be one of "decimal", "float", "float32" or "float64".') 550 .expect('EOL') 551 comp = .typeProvider to Compiler? 552 if comp, comp.numberTypeName = typeName.text 545 553 else 546 554 .throwError('Unknown compiler directive.')
