Ticket #64: ticket64.patch
File ticket64.patch, 1.2 KB (added by eric.sellon, 15 years ago) |
---|
-
Source/Parser.cobra
226 226 def _warning(msg as String) 227 227 _warning(.last, msg) 228 228 229 def _warning(token as IToken , msg as String)229 def _warning(token as IToken?, msg as String) 230 230 _warningRecorder.warning(CobraWarning(_fileName, token, msg)) 231 231 232 232 # TODO: do this with a callback/delegate instead of this bullshit Java-style interface technique -
Source/CobraParser.cobra
40 40 p.globalNS = NameSpace(Token.empty, '(global)') 41 41 p.typeProvider = BasicTypeProvider() 42 42 p.parseSource('test2', 'class Test\n\tdef main is shared\n\t\treturn\n') 43 44 c = Compiler() 45 p = CobraParser(typeProvider=c, warningRecorder=c, errorRecorder=c, globalNS=c.globalNS) 46 p.parseSource('test3', '') 47 48 c = Compiler() 49 p = CobraParser(typeProvider=c, warningRecorder=c, errorRecorder=c, globalNS=c.globalNS) 50 p.parseSource('test4', ' ') 43 51 44 52 shared 45 53