diff options
| author | Kamyar Mohajerani | 2016-07-21 23:40:34 +0430 |
|---|---|---|
| committer | Jack Koenig | 2016-07-21 12:10:34 -0700 |
| commit | ab340febdc7a5418da945f9b79624d36e66e26db (patch) | |
| tree | 04e4aef30081fdd419281d69be4b141fd49b4b1f /src/main/scala/firrtl/passes/SplitExpressions.scala | |
| parent | b7de40e23161a7346fea90576f07b5c200c2675b (diff) | |
Indentation support for the ANTLR parser (as discussed in #192) (#194)
Indentation support for the ANTLR parser
- some clean-up of the parser code (TODO: file input could be improved, more clean-up)
- get rid of Translator and specify all syntactic rules in antlr4 grammer
- support for else-when shorthand in the grammar
- rename Begin to Block which makes more sense
Diffstat (limited to 'src/main/scala/firrtl/passes/SplitExpressions.scala')
| -rw-r--r-- | src/main/scala/firrtl/passes/SplitExpressions.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/scala/firrtl/passes/SplitExpressions.scala b/src/main/scala/firrtl/passes/SplitExpressions.scala index 973e1be9..1c9674e1 100644 --- a/src/main/scala/firrtl/passes/SplitExpressions.scala +++ b/src/main/scala/firrtl/passes/SplitExpressions.scala @@ -45,11 +45,11 @@ object SplitExpressions extends Pass { } val x = s map onExp x match { - case x: Begin => x map onStmt + case x: Block => x map onStmt case EmptyStmt => x case x => { v += x - if (v.size > 1) Begin(v.toVector) + if (v.size > 1) Block(v.toVector) else v(0) } } |
