mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user