whitespace
This commit is contained in:
parent
c1fcef1873
commit
dc81410008
|
@ -4,7 +4,7 @@
|
||||||
* This module contains a range-based _lexer for the D programming language.
|
* This module contains a range-based _lexer for the D programming language.
|
||||||
*
|
*
|
||||||
* For performance reasons the _lexer contained in this module operates only on
|
* For performance reasons the _lexer contained in this module operates only on
|
||||||
* ASCII and UTF-8 encoded source code. If the use of other encodings is
|
* ASCII or UTF-8 encoded source code. If the use of other encodings is
|
||||||
* desired, the source code must be converted to UTF-8 before passing it to this
|
* desired, the source code must be converted to UTF-8 before passing it to this
|
||||||
* _lexer.
|
* _lexer.
|
||||||
*
|
*
|
||||||
|
@ -431,15 +431,15 @@ L_advance:
|
||||||
"=", "TokenType.assign",
|
"=", "TokenType.assign",
|
||||||
"@", "TokenType.at",
|
"@", "TokenType.at",
|
||||||
"&", "TokenType.bitAnd",
|
"&", "TokenType.bitAnd",
|
||||||
"&=", "TokenType.bitAndEquals",
|
"&=", "TokenType.bitAndEqual",
|
||||||
"|", "TokenType.bitOr",
|
"|", "TokenType.bitOr",
|
||||||
"|=", "TokenType.bitOrEquals",
|
"|=", "TokenType.bitOrEqual",
|
||||||
"~=", "TokenType.catEquals",
|
"~=", "TokenType.catEqual",
|
||||||
":", "TokenType.colon",
|
":", "TokenType.colon",
|
||||||
",", "TokenType.comma",
|
",", "TokenType.comma",
|
||||||
"--", "TokenType.decrement",
|
"--", "TokenType.decrement",
|
||||||
"$", "TokenType.dollar",
|
"$", "TokenType.dollar",
|
||||||
"==", "TokenType.equals",
|
"==", "TokenType.equal",
|
||||||
"=>", "TokenType.goesTo",
|
"=>", "TokenType.goesTo",
|
||||||
">", "TokenType.greater",
|
">", "TokenType.greater",
|
||||||
">=", "TokenType.greaterEqual",
|
">=", "TokenType.greaterEqual",
|
||||||
|
@ -454,21 +454,21 @@ L_advance:
|
||||||
"||", "TokenType.logicOr",
|
"||", "TokenType.logicOr",
|
||||||
"(", "TokenType.lParen",
|
"(", "TokenType.lParen",
|
||||||
"-", "TokenType.minus",
|
"-", "TokenType.minus",
|
||||||
"-=", "TokenType.minusEquals",
|
"-=", "TokenType.minusEqual",
|
||||||
"%", "TokenType.mod",
|
"%", "TokenType.mod",
|
||||||
"%=", "TokenType.modEquals",
|
"%=", "TokenType.modEqual",
|
||||||
"*=", "TokenType.mulEquals",
|
"*=", "TokenType.mulEqual",
|
||||||
"!", "TokenType.not",
|
"!", "TokenType.not",
|
||||||
"!=", "TokenType.notEquals",
|
"!=", "TokenType.notEqual",
|
||||||
"!>", "TokenType.notGreater",
|
"!>", "TokenType.notGreater",
|
||||||
"!>=", "TokenType.notGreaterEqual",
|
"!>=", "TokenType.notGreaterEqual",
|
||||||
"!<", "TokenType.notLess",
|
"!<", "TokenType.notLess",
|
||||||
"!<=", "TokenType.notLessEqual",
|
"!<=", "TokenType.notLessEqual",
|
||||||
"!<>", "TokenType.notLessEqualGreater",
|
"!<>", "TokenType.notLessEqualGreater",
|
||||||
"+", "TokenType.plus",
|
"+", "TokenType.plus",
|
||||||
"+=", "TokenType.plusEquals",
|
"+=", "TokenType.plusEqual",
|
||||||
"^^", "TokenType.pow",
|
"^^", "TokenType.pow",
|
||||||
"^^=", "TokenType.powEquals",
|
"^^=", "TokenType.powEqual",
|
||||||
"}", "TokenType.rBrace",
|
"}", "TokenType.rBrace",
|
||||||
"]", "TokenType.rBracket",
|
"]", "TokenType.rBracket",
|
||||||
")", "TokenType.rParen",
|
")", "TokenType.rParen",
|
||||||
|
@ -484,7 +484,7 @@ L_advance:
|
||||||
">>>", "TokenType.unsignedShiftRight",
|
">>>", "TokenType.unsignedShiftRight",
|
||||||
">>>=", "TokenType.unsignedShiftRightEqual",
|
">>>=", "TokenType.unsignedShiftRightEqual",
|
||||||
"^", "TokenType.xor",
|
"^", "TokenType.xor",
|
||||||
"^=", "TokenType.xorEquals",
|
"^=", "TokenType.xorEqual",
|
||||||
));
|
));
|
||||||
case '/':
|
case '/':
|
||||||
nextCharNonLF();
|
nextCharNonLF();
|
||||||
|
@ -505,7 +505,7 @@ L_advance:
|
||||||
goto L_advance; // tail-recursion
|
goto L_advance; // tail-recursion
|
||||||
|
|
||||||
case '=':
|
case '=':
|
||||||
current.type = TokenType.divEquals;
|
current.type = TokenType.divEqual;
|
||||||
current.value = "/=";
|
current.value = "/=";
|
||||||
src.popFront();
|
src.popFront();
|
||||||
return;
|
return;
|
||||||
|
@ -1881,7 +1881,7 @@ L_advance:
|
||||||
*/
|
*/
|
||||||
pure nothrow bool isOperator(const TokenType t)
|
pure nothrow bool isOperator(const TokenType t)
|
||||||
{
|
{
|
||||||
return t >= TokenType.assign && t <= TokenType.xorEquals;
|
return t >= TokenType.assign && t <= TokenType.xorEqual;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2045,18 +2045,18 @@ enum TokenType: ushort
|
||||||
assign, /// =
|
assign, /// =
|
||||||
at, /// @
|
at, /// @
|
||||||
bitAnd, /// &
|
bitAnd, /// &
|
||||||
bitAndEquals, /// &=
|
bitAndEqual, /// &=
|
||||||
bitOr, /// |
|
bitOr, /// |
|
||||||
bitOrEquals, /// |=
|
bitOrEqual, /// |=
|
||||||
catEquals, /// ~=
|
catEqual, /// ~=
|
||||||
colon, /// :
|
colon, /// :
|
||||||
comma, /// ,
|
comma, /// ,
|
||||||
decrement, /// --
|
decrement, /// --
|
||||||
div, /// /
|
div, /// /
|
||||||
divEquals, /// /=
|
divEqual, /// /=
|
||||||
dollar, /// $
|
dollar, /// $
|
||||||
dot, /// .
|
dot, /// .
|
||||||
equals, /// ==
|
equal, /// ==
|
||||||
goesTo, /// =>
|
goesTo, /// =>
|
||||||
greater, /// >
|
greater, /// >
|
||||||
greaterEqual, /// >=
|
greaterEqual, /// >=
|
||||||
|
@ -2072,21 +2072,21 @@ enum TokenType: ushort
|
||||||
logicOr, /// ||
|
logicOr, /// ||
|
||||||
lParen, /// $(LPAREN)
|
lParen, /// $(LPAREN)
|
||||||
minus, /// -
|
minus, /// -
|
||||||
minusEquals, /// -=
|
minusEqual, /// -=
|
||||||
mod, /// %
|
mod, /// %
|
||||||
modEquals, /// %=
|
modEqual, /// %=
|
||||||
mulEquals, /// *=
|
mulEqual, /// *=
|
||||||
not, /// !
|
not, /// !
|
||||||
notEquals, /// !=
|
notEqual, /// !=
|
||||||
notGreater, /// !>
|
notGreater, /// !>
|
||||||
notGreaterEqual, /// !>=
|
notGreaterEqual, /// !>=
|
||||||
notLess, /// !<
|
notLess, /// !<
|
||||||
notLessEqual, /// !<=
|
notLessEqual, /// !<=
|
||||||
notLessEqualGreater, /// !<>
|
notLessEqualGreater, /// !<>
|
||||||
plus, /// +
|
plus, /// +
|
||||||
plusEquals, /// +=
|
plusEqual, /// +=
|
||||||
pow, /// ^^
|
pow, /// ^^
|
||||||
powEquals, /// ^^=
|
powEqual, /// ^^=
|
||||||
rBrace, /// }
|
rBrace, /// }
|
||||||
rBracket, /// ]
|
rBracket, /// ]
|
||||||
rParen, /// $(RPAREN)
|
rParen, /// $(RPAREN)
|
||||||
|
@ -2104,7 +2104,7 @@ enum TokenType: ushort
|
||||||
unsignedShiftRightEqual, /// >>>=
|
unsignedShiftRightEqual, /// >>>=
|
||||||
vararg, /// ...
|
vararg, /// ...
|
||||||
xor, /// ^
|
xor, /// ^
|
||||||
xorEquals, /// ^=
|
xorEqual, /// ^=
|
||||||
|
|
||||||
bool_, /// $(D_KEYWORD bool)
|
bool_, /// $(D_KEYWORD bool)
|
||||||
byte_, /// $(D_KEYWORD byte)
|
byte_, /// $(D_KEYWORD byte)
|
||||||
|
|
Loading…
Reference in New Issue