From 7d1e2cb03b39300c02089a0c2bab67dc1991f36e Mon Sep 17 00:00:00 2001 From: Adrian Thurston Date: Sun, 11 Sep 2011 06:12:47 +0000 Subject: Passing an args struct into the code gen objects. Makes it easy to alter the arguments without modifying a whole lot of constructor functions. refs #321. --- ragel/gendata.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'ragel/gendata.cc') diff --git a/ragel/gendata.cc b/ragel/gendata.cc index eb5481db..938a1250 100644 --- a/ragel/gendata.cc +++ b/ragel/gendata.cc @@ -107,11 +107,11 @@ void genLineDirective( ostream &out ) /* Total error count. */ /* int gblErrorCount = 0; */ -CodeGenData::CodeGenData( ostream &out ) +CodeGenData::CodeGenData( const CodeGenArgs &args ) : - sourceFileName(0), - fsmName(0), - out(out), + sourceFileName(args.sourceFileName), + fsmName(args.fsmName), + out(args.out), redFsm(0), allActions(0), allActionTables(0), @@ -143,7 +143,6 @@ CodeGenData::CodeGenData( ostream &out ) noCS(false) {} - void CodeGenData::createMachine() { redFsm = new RedFsmAp(); -- cgit v1.2.1