mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
d: examples: simple: fix style
* examples/d/simple/calc.y: Formatting changes.
This commit is contained in:
committed by
Akim Demaille
parent
615bad4186
commit
d53bbd5f06
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user