Changeset 817
- Timestamp:
- Aug 2, 2012 6:44:26 PM (12 years ago)
- Location:
- branches/magnolia-eclipse-0.2.27/src/org/magnolialang
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/magnolia-eclipse-0.2.27/src/org/magnolialang/eclipse/builders/MagnoliaBuilder.java
r691 r817 252 252 IConstructor info = ((IConstructor) compiler.getFact(rm, MagnoliaFacts.Type_DefInfo, name)); 253 253 String kind = ((IString) info.get("kind")).getValue(); 254 if( kind.equals("implementation") ||kind.equals("library")) {254 if(/* kind.equals("implementation") || */kind.equals("library")) { 255 255 toClean = buildOutput(manager, compiler, rm, name, toClean); 256 256 } … … 288 288 if(result instanceof IString) { 289 289 String code = ((IString) result).getValue(); 290 if(prelude == null) 291 loadPrelude(); 292 code = prelude + "\n" + code; 293 String outname = Magnolia.yieldName(name).replaceAll("\\.", "/") + ".cxx"; 294 IPath path = manager.getOutFolder().append(outname); 295 toClean = createFile(code, path, toClean); 290 if(!code.startsWith("//-")) { 291 if(prelude == null) 292 loadPrelude(); 293 code = prelude + "\n" + code; 294 String outname = Magnolia.yieldName(name).replaceAll("\\.", "/") + ".cxx"; 295 IPath path = manager.getOutFolder().append(outname); 296 toClean = createFile(code, path, toClean); 297 } 296 298 } 297 299 return toClean; -
branches/magnolia-eclipse-0.2.27/src/org/magnolialang/magnolia/backend/CxxBackend.rsc
r796 r817 42 42 errors = getErrors(arg); 43 43 str body = ""; 44 bool hasCode = false; 44 45 // library 45 46 if(DeclBody(_) := tree) { … … 56 57 if(info.kind == "library") 57 58 body = generateCommandInterface(tr, ds, info.qName, body); 59 hasCode = true; 58 60 println("CxxCode cmdInterface: at <getMilliTime()-time> ms (for <nameToStr(astValue(key[1]))>)"); 59 61 } … … 71 73 println("CxxCode indentStr: <getMilliTime()-t2> ms (for <nameToStr(astValue(key[1]))>)"); 72 74 if(errors == {}) 73 setFact(tr, #CxxCode, key, CxxCode("// <info.kind>: <dispNameOf(info.qName)>\n<body>\n", errors));75 setFact(tr, #CxxCode, key, CxxCode("//<hasCode ? " " : "-"> <info.kind>: <dispNameOf(info.qName)>\n<body>\n", errors)); 74 76 else 75 setFact(tr, #CxxCode, key, CxxCode("// <info.kind>: <dispNameOf(info.qName)>\n// CODE DISABLED DUE TO COMPILATION ERRORS\n// <replaceAll(body, "\n", "\n// ")>\n", errors));77 setFact(tr, #CxxCode, key, CxxCode("//- <info.kind>: <dispNameOf(info.qName)>\n// CODE DISABLED DUE TO COMPILATION ERRORS\n// <replaceAll(body, "\n", "\n// ")>\n", errors)); 76 78 } 77 79 else {
Note:
See TracChangeset
for help on using the changeset viewer.