diff options
author | Adela Vais <adela.vais99@gmail.com> | 2021-01-12 20:49:41 +0200 |
---|---|---|
committer | Akim Demaille <akim.demaille@gmail.com> | 2021-01-17 08:38:35 +0100 |
commit | d53bbd5f0638033032bef9d42ab0134bb339b50b (patch) | |
tree | 6522acdda01c4a1261a9901466053899fb78ba87 /examples | |
parent | 615bad418689ae75753a845cd622c8e911e6dbf5 (diff) | |
download | bison-d53bbd5f0638033032bef9d42ab0134bb339b50b.tar.gz |
d: examples: simple: fix style
* examples/d/simple/calc.y: Formatting changes.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/d/simple/calc.y | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/d/simple/calc.y b/examples/d/simple/calc.y index 7873e71a..2ca75f69 100644 --- a/examples/d/simple/calc.y +++ b/examples/d/simple/calc.y @@ -115,16 +115,16 @@ if (isInputRange!R && is(ElementType!R : dchar)) // Numbers. if (input.front.isNumber) - { - import std.conv : parse; - return Symbol(TokenKind.NUM, input.parse!int); - } + { + import std.conv : parse; + return Symbol(TokenKind.NUM, input.parse!int); + } // Individual characters auto ch = input.front; input.popFront; switch (ch) - { + { case '+': return Symbol(TokenKind.PLUS); case '-': return Symbol(TokenKind.MINUS); case '*': return Symbol(TokenKind.STAR); @@ -133,7 +133,7 @@ if (isInputRange!R && is(ElementType!R : dchar)) case ')': return Symbol(TokenKind.RPAR); case '\n': return Symbol(TokenKind.EOL); default: assert(0); - } + } } } |