Ticket #41: fixNoWarnings.patch
File fixNoWarnings.patch, 1.7 KB (added by hopscc, 16 years ago) |
---|
-
Source/Tokenizer.cobra
800 800 801 801 def addNoWarning(token as IToken) 802 802 _noWarningLines.add('[token.fileName]:[token.lineNum]') 803 803 804 804 def checkTokens(tokens as List<of IToken>, expected as String) 805 805 is shared 806 806 """ -
Source/Compiler.cobra
74 74 var _warnings as List<of SourceException> 75 75 var _messages as List<of SourceException> # all errors and warnings 76 76 var _messagesPerSourceLine as IDictionary<of String, List<of SourceException>> # key is 'filename:lineNum' 77 var _noWarningLines as ISet<of String> # key is 'filename:lineNum'77 var _noWarningLines as Set<of String> # key is 'filename:lineNum' 78 78 79 79 var _intermediateFileNames as List<of String> 80 80 var _baseExeFileName as String = '' … … 184 184 185 185 get messages from var 186 186 187 pro noWarningLines from var 187 set noWarningLines as ISet<of String> #from var 188 if value.count and value inherits Set<of String> 189 _noWarningLines.addRange(value) 188 190 189 191 pro htmlWriter from var 190 192 """ … … 1170 1172 # TODO: add suppress all warnings (cmdline sw) - maybe? 1171 1173 # TODO: add suppress by error tag - maybe? 1172 1174 entry = if(cw.hasSourceSite, '[cw.fileName]:[cw.lineNum]', '') 1173 return _noWarningLines.contains(entry) 1174 1175 return _noWarningLines.contains(entry) 1176 1175 1177 def augmentWarning(node as ISyntaxNode, lookFor as String, search as String, augment as String) as bool 1176 1178 require 1177 1179 lookFor.length