summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@complang.org>2012-07-09 14:28:50 -0400
committerAdrian Thurston <thurston@complang.org>2012-07-09 14:28:50 -0400
commit500e9f6a87a1b96ec234a04e5d07899a0c107830 (patch)
tree128d2060f4d618f7a87efb724499aab04ee080b6
parentc74ad7c5cd5e5e6830c2d5bc26d6250e59c5d258 (diff)
downloadcolm-500e9f6a87a1b96ec234a04e5d07899a0c107830.tar.gz
some fixes for the static constructor functions
-rw-r--r--src/lmparse.kl2
-rw-r--r--src/parsetree.h10
2 files changed, 11 insertions, 1 deletions
diff --git a/src/lmparse.kl b/src/lmparse.kl
index bf1b6a7a..cd8f9255 100644
--- a/src/lmparse.kl
+++ b/src/lmparse.kl
@@ -2454,7 +2454,7 @@ regular_expr_or_data:
};
regular_expr_or_data:
final {
- $$->reOrBlock = new ReOrBlock();
+ $$->reOrBlock = ReOrBlock::cons();
};
# A single character inside of an or expression. Can either be a character or a
diff --git a/src/parsetree.h b/src/parsetree.h
index 9dee081d..db4e2900 100644
--- a/src/parsetree.h
+++ b/src/parsetree.h
@@ -1503,6 +1503,16 @@ struct ReplItem
FactorType
};
+ ReplItem()
+ :
+ type((Type)-1),
+ expr(0),
+ langEl(0),
+ factor(0),
+ bindId(-1)
+ {
+ }
+
static ReplItem *cons( const InputLoc &loc, Type type, const String &data )
{
ReplItem *r = new ReplItem;