Skip to content

Commit

Permalink
c struct writer mostly works
Browse files Browse the repository at this point in the history
  • Loading branch information
mck1117 committed Jul 18, 2023
1 parent ca40f2d commit 0a5e356
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.rusefi;

import com.rusefi.newparse.outputs.CStructWriter;
import com.rusefi.newparse.ParseState;
import com.rusefi.newparse.parsing.Definition;
import com.rusefi.output.*;
Expand Down Expand Up @@ -65,6 +66,7 @@ public static void doJob(String[] args, ReaderStateImpl state) throws IOExceptio

String tsInputFileFolder = null;
String destCDefinesFileName = null;
String cHeaderDestination = null;
// we postpone reading so that in case of cache hit we do less work
String firingEnumFileName = null;
String triggersInputFolder = null;
Expand All @@ -84,6 +86,7 @@ public static void doJob(String[] args, ReaderStateImpl state) throws IOExceptio
tsInputFileFolder = args[i + 1];
break;
case KEY_C_DESTINATION:
cHeaderDestination = args[i + 1];
state.addCHeaderDestination(args[i + 1]);
break;
case KEY_ZERO_INIT:
Expand Down Expand Up @@ -188,12 +191,12 @@ public static void doJob(String[] args, ReaderStateImpl state) throws IOExceptio
{
// don't allow duplicates in the main file
parseState.setDefinitionPolicy(Definition.OverwritePolicy.NotAllowed);
// RusefiParseErrorStrategy.parseDefinitionFile(parseState.getListener(), state.definitionInputFile);
RusefiParseErrorStrategy.parseDefinitionFile(parseState.getListener(), state.definitionInputFile);
}

// Write C structs
// CStructWriter cStructs = new CStructWriter();
// cStructs.writeCStructs(parseState, destCHeaderFileName + ".test");
CStructWriter cStructs = new CStructWriter();
cStructs.writeCStructs(parseState, cHeaderDestination + ".test");

// Write tunerstudio layout
// TsWriter writer = new TsWriter();
Expand Down

0 comments on commit 0a5e356

Please sign in to comment.