d: style changes

* data/skeletons/lalr1.d: here.
* examples/d/calc.y: Remove incorrect support for decimal numbers.
Formatting changes.
This commit is contained in:
Akim Demaille
2019-06-17 18:09:12 +02:00
parent c23fa0fc97
commit df77a98edf
2 changed files with 9 additions and 12 deletions

View File

@@ -102,16 +102,14 @@ class CalcLexer(R) : Lexer
// Skip initial spaces
while (!input.empty && input.front != '\n' && isWhite (input.front))
{
input.popFront;
}
// Handle EOF.
if (input.empty)
return YYTokenType.EOF;
// Numbers.
if (input.front == '.' || input.front.isNumber)
if (input.front.isNumber)
{
import std.conv : parse;
semanticVal_.ival = input.parse!int;