Changeset 1754
- Timestamp:
- 11/09/08 03:02:45 (2 months ago)
- Location:
- cobra/trunk/Source
- Files:
-
- 2 modified
-
BackEndClr/SharpGenerator.cobra (modified) (2 diffs)
-
Compiler.cobra (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cobra/trunk/Source/BackEndClr/SharpGenerator.cobra
r1752 r1754 6 6 7 7 ## 8 ## BackEnd 9 ## 10 11 class ClrBackEnd 12 inherits BackEnd 13 14 def init(compiler as Compiler) 15 base.init(compiler) 16 17 def generateCode(writeTestInvocation as bool) is override 18 .compiler.writeSharp 19 if writeTestInvocation 20 .compiler.writeSharpTestInvocation 21 .compiler.compileSharp('/main:RunTests') 22 else 23 .compiler.compileSharp 24 25 26 ## 8 27 ## Compiler 9 28 ## … … 15 34 var _fullExeFileName as String = '' 16 35 var _moduleFileName_to_sharpToCobraLineNum as Dictionary<of String, Dictionary<of int, int>?>? 17 18 def generateCode(writeTestInvocation as bool)19 .writeSharp20 if writeTestInvocation21 .writeSharpTestInvocation22 .compileSharp('/main:RunTests')23 else24 .compileSharp25 36 26 37 def writeSharp -
cobra/trunk/Source/Compiler.cobra
r1752 r1754 36 36 37 37 38 class BackEnd 39 is abstract 40 41 def init(compiler as Compiler) 42 __compiler = compiler 43 44 get compiler from __compiler as Compiler 45 46 def generateCode(writeTestInvocation as bool) is abstract 47 48 38 49 class Compiler 39 50 is partial … … 47 58 * codeMemberStack - methods, properties and inits 48 59 """ 60 61 var _backEnd as BackEnd? 49 62 50 63 var _nextSerialNum as int is shared … … 98 111 def init(verbosity as int, initialModules as IList<of Module>?) 99 112 Node.reset 113 _backEnd = ClrBackEnd(this) 100 114 _nextSerialNum += 1 101 115 _serialNum = _nextSerialNum … … 129 143 def toString as String is override 130 144 return '[.getType.name]([_serialNum])' 145 146 get backEnd from var 131 147 132 148 get verbosity from var … … 286 302 .bindImp 287 303 .writeSourceCodeCorrections 288 . generateCode(writeTestInvocation)304 .backEnd.generateCode(writeTestInvocation) 289 305 290 306 def testifyFilesNamed(fileNames as IList<of String>, options as OptionValues, resultsWriter as IndentedWriter, verbose as bool)
