From ee828d42d730aa73f5d579c2650819aff22d7f2c Mon Sep 17 00:00:00 2001 From: Adrian Thurston Date: Wed, 9 Dec 2020 10:06:59 -0800 Subject: don't use InputLoc in GenAction so we can keep it trivial. --- src/redbuild.cc | 4 ++-- src/redfsm.cc | 2 +- src/redfsm.h | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/redbuild.cc b/src/redbuild.cc index 7e0396d7..7f600ee7 100644 --- a/src/redbuild.cc +++ b/src/redbuild.cc @@ -382,8 +382,8 @@ void RedFsmBuild::newAction( int anum, char *name, int line, int col, Action *ac { redFsm->allActions[anum].actionId = anum; redFsm->allActions[anum].name = name; - redFsm->allActions[anum].loc.line = line; - redFsm->allActions[anum].loc.col = col; + redFsm->allActions[anum].loc_line = line; + redFsm->allActions[anum].loc_col = col; redFsm->allActions[anum].inlineList = action->inlineList; redFsm->allActions[anum].objField = action->objField; redFsm->allActions[anum].markType = action->markType; diff --git a/src/redfsm.cc b/src/redfsm.cc index d79a1e32..6d5c426b 100644 --- a/src/redfsm.cc +++ b/src/redfsm.cc @@ -41,7 +41,7 @@ string nameOrLoc( GenAction *genAction ) return string(genAction->name); else { ostringstream ret; - ret << genAction->loc.line << ":" << genAction->loc.col; + ret << genAction->loc_line << ":" << genAction->loc_col; return ret.str(); } } diff --git a/src/redfsm.h b/src/redfsm.h index 618fbd61..65a43c6c 100644 --- a/src/redfsm.h +++ b/src/redfsm.h @@ -60,7 +60,8 @@ struct ObjectField; struct GenAction { /* Data collected during parse. */ - InputLoc loc; + int loc_line; + int loc_col; char *name; InlineList *inlineList; int actionId; -- cgit v1.2.1