Fixed decimal lexing and renamed stdx to std
This commit is contained in:
parent
36cf1a6ed6
commit
8954fff8e4
|
@ -2,7 +2,7 @@ module analysis.base;
|
|||
|
||||
import std.container;
|
||||
import std.string;
|
||||
import stdx.d.ast;
|
||||
import std.d.ast;
|
||||
import std.array;
|
||||
|
||||
struct Message
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
module analysis.constructors;
|
||||
|
||||
import stdx.d.ast;
|
||||
import stdx.d.lexer;
|
||||
import std.d.ast;
|
||||
import std.d.lexer;
|
||||
import analysis.base;
|
||||
|
||||
class ConstructorCheck : BaseAnalyzer
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
|
||||
module analysis.del;
|
||||
|
||||
import stdx.d.ast;
|
||||
import stdx.d.lexer;
|
||||
import std.d.ast;
|
||||
import std.d.lexer;
|
||||
import analysis.base;
|
||||
|
||||
/**
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
|
||||
module analysis.enumarrayliteral;
|
||||
|
||||
import stdx.d.ast;
|
||||
import stdx.d.lexer;
|
||||
import std.d.ast;
|
||||
import std.d.lexer;
|
||||
import analysis.base;
|
||||
|
||||
void doNothing(string, size_t, size_t, string, bool) {}
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
|
||||
module analysis.fish;
|
||||
|
||||
import stdx.d.ast;
|
||||
import stdx.d.lexer;
|
||||
import std.d.ast;
|
||||
import std.d.lexer;
|
||||
import analysis.base;
|
||||
|
||||
/**
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
|
||||
module analysis.ifelsesame;
|
||||
|
||||
import stdx.d.ast;
|
||||
import stdx.d.lexer;
|
||||
import std.d.ast;
|
||||
import std.d.lexer;
|
||||
import analysis.base;
|
||||
|
||||
/**
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
module analysis.linespan;
|
||||
|
||||
|
||||
/**
|
||||
* Used for determining which lines to include as context in the generated HTML
|
||||
* report.
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
module analysis.numbers;
|
||||
|
||||
import std.regex;
|
||||
import stdx.d.ast;
|
||||
import stdx.d.lexer;
|
||||
import std.d.ast;
|
||||
import std.d.lexer;
|
||||
import analysis.base;
|
||||
|
||||
/**
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
module analysis.objectconst;
|
||||
|
||||
import std.regex;
|
||||
import stdx.d.ast;
|
||||
import stdx.d.lexer;
|
||||
import std.d.ast;
|
||||
import std.d.lexer;
|
||||
import analysis.base;
|
||||
|
||||
/**
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
|
||||
module analysis.pokemon;
|
||||
|
||||
import stdx.d.ast;
|
||||
import stdx.d.lexer;
|
||||
import std.d.ast;
|
||||
import std.d.lexer;
|
||||
import analysis.base;
|
||||
|
||||
/**
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
|
||||
module analysis.range;
|
||||
|
||||
import stdx.d.ast;
|
||||
import stdx.d.lexer;
|
||||
import std.d.ast;
|
||||
import std.d.lexer;
|
||||
import analysis.base;
|
||||
|
||||
/**
|
||||
|
|
|
@ -6,10 +6,9 @@ import std.conv;
|
|||
import std.algorithm;
|
||||
import std.range;
|
||||
import std.array;
|
||||
|
||||
import stdx.d.lexer;
|
||||
import stdx.d.parser;
|
||||
import stdx.d.ast;
|
||||
import std.d.lexer;
|
||||
import std.d.parser;
|
||||
import std.d.ast;
|
||||
|
||||
import analysis.base;
|
||||
import analysis.style;
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
|
||||
module analysis.style;
|
||||
|
||||
import stdx.d.ast;
|
||||
import stdx.d.lexer;
|
||||
import std.d.ast;
|
||||
import std.d.lexer;
|
||||
import std.regex;
|
||||
import std.array;
|
||||
import std.conv;
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
import stdx.d.lexer;
|
||||
import stdx.d.ast;
|
||||
import std.d.lexer;
|
||||
import std.d.ast;
|
||||
import std.stdio;
|
||||
import std.string;
|
||||
import std.array;
|
||||
|
|
4
build.sh
4
build.sh
|
@ -7,8 +7,8 @@ dmd\
|
|||
astprinter.d\
|
||||
formatter.d\
|
||||
outliner.d\
|
||||
stdx/*.d\
|
||||
stdx/d/*.d\
|
||||
std/*.d\
|
||||
std/d/*.d\
|
||||
analysis/*.d\
|
||||
-ofdscanner\
|
||||
-m64 -g\
|
||||
|
|
6
ctags.d
6
ctags.d
|
@ -5,9 +5,9 @@
|
|||
|
||||
module ctags;
|
||||
|
||||
import stdx.d.parser;
|
||||
import stdx.d.lexer;
|
||||
import stdx.d.ast;
|
||||
import std.d.parser;
|
||||
import std.d.lexer;
|
||||
import std.d.ast;
|
||||
import std.algorithm;
|
||||
import std.range;
|
||||
import std.stdio;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
module formatter;
|
||||
|
||||
import stdx.d.ast;
|
||||
import stdx.d.lexer;
|
||||
import std.d.ast;
|
||||
import std.d.lexer;
|
||||
|
||||
/**
|
||||
* The only brace styles worth using.
|
||||
|
|
|
@ -8,7 +8,7 @@ module highlighter;
|
|||
|
||||
import std.stdio;
|
||||
import std.array;
|
||||
import stdx.d.lexer;
|
||||
import std.d.lexer;
|
||||
|
||||
// http://ethanschoonover.com/solarized
|
||||
void highlight(R)(ref R tokens, string fileName)
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
module imports;
|
||||
|
||||
import stdx.d.ast;
|
||||
import std.d.ast;
|
||||
import std.stdio;
|
||||
import std.container;
|
||||
|
||||
|
|
6
main.d
6
main.d
|
@ -13,9 +13,9 @@ import std.getopt;
|
|||
import std.path;
|
||||
import std.stdio;
|
||||
import std.range;
|
||||
import stdx.lexer;
|
||||
import stdx.d.lexer;
|
||||
import stdx.d.parser;
|
||||
import std.lexer;
|
||||
import std.d.lexer;
|
||||
import std.d.parser;
|
||||
|
||||
import highlighter;
|
||||
import stats;
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
import stdx.d.lexer;
|
||||
import stdx.d.ast;
|
||||
import std.d.lexer;
|
||||
import std.d.ast;
|
||||
import std.stdio;
|
||||
import std.string;
|
||||
import std.array;
|
||||
|
|
2
stats.d
2
stats.d
|
@ -7,7 +7,7 @@ module stats;
|
|||
|
||||
import std.stdio;
|
||||
import std.algorithm;
|
||||
import stdx.d.lexer;
|
||||
import std.d.lexer;
|
||||
|
||||
pure nothrow bool isLineOfCode(IdType t)
|
||||
{
|
||||
|
|
|
@ -246,7 +246,7 @@ uses an array of allocators, one per bucket, to satisfy requests.))
|
|||
)
|
||||
*/
|
||||
|
||||
module stdx.allocator;
|
||||
module std.allocator;
|
||||
|
||||
// Example in the synopsis above
|
||||
unittest
|
|
@ -14,9 +14,9 @@
|
|||
* Source: $(PHOBOSSRC std/d/_ast.d)
|
||||
*/
|
||||
|
||||
module stdx.d.ast;
|
||||
module std.d.ast;
|
||||
|
||||
import stdx.d.lexer;
|
||||
import std.d.lexer;
|
||||
import std.traits;
|
||||
import std.algorithm;
|
||||
import std.array;
|
|
@ -9,7 +9,7 @@
|
|||
* Source: $(PHOBOSSRC std/d/_entities.d)
|
||||
*/
|
||||
|
||||
module stdx.d.entities;
|
||||
module std.d.entities;
|
||||
|
||||
/**
|
||||
* Generated from $(LINK http://www.w3.org/TR/html5/entities.json)
|
|
@ -1,12 +1,12 @@
|
|||
module stdx.d.lexer;
|
||||
module std.d.lexer;
|
||||
|
||||
import std.typecons;
|
||||
import std.typetuple;
|
||||
import std.array;
|
||||
import std.algorithm;
|
||||
import std.range;
|
||||
import stdx.lexer;
|
||||
public import stdx.lexer : StringCache;
|
||||
import std.lexer;
|
||||
public import std.lexer : StringCache;
|
||||
|
||||
private enum operators = [
|
||||
",", ".", "..", "...", "/", "/=", "!", "!<", "!<=", "!<>", "!<>=", "!=",
|
||||
|
@ -91,7 +91,7 @@ private enum extraFields = q{
|
|||
return 0;
|
||||
}
|
||||
};
|
||||
public alias Token = stdx.lexer.TokenStructure!(IdType, extraFields);
|
||||
public alias Token = std.lexer.TokenStructure!(IdType, extraFields);
|
||||
|
||||
/**
|
||||
* Configure string lexing behavior
|
||||
|
@ -742,13 +742,18 @@ public struct DLexer
|
|||
// "double identifier".
|
||||
if (range.canPeek(1))
|
||||
{
|
||||
switch (range.peekAt(1))
|
||||
auto ch = range.peekAt(1);
|
||||
if (ch <= 0x2f
|
||||
|| (ch >= '0' && ch <= '9')
|
||||
|| (ch >= ':' && ch <= '@')
|
||||
|| (ch >= '[' && ch <= '^')
|
||||
|| (ch >= '{' && ch <= '~')
|
||||
|| ch == '`' || ch == '_')
|
||||
{
|
||||
case '0': .. case '9':
|
||||
goto doubleLiteral;
|
||||
default:
|
||||
break decimalLoop;
|
||||
}
|
||||
else
|
||||
break decimalLoop;
|
||||
}
|
||||
else
|
||||
{
|
|
@ -8,11 +8,11 @@
|
|||
* LITERAL = $(D_STRING $(I $0))
|
||||
*/
|
||||
|
||||
module stdx.d.parser;
|
||||
module std.d.parser;
|
||||
|
||||
import stdx.d.lexer;
|
||||
import stdx.d.ast;
|
||||
import stdx.allocator;
|
||||
import std.d.lexer;
|
||||
import std.d.ast;
|
||||
import std.allocator;
|
||||
import std.conv;
|
||||
import std.algorithm;
|
||||
import std.array;
|
|
@ -112,7 +112,7 @@
|
|||
* Source: $(PHOBOSSRC std/_lexer.d)
|
||||
*/
|
||||
|
||||
module stdx.lexer;
|
||||
module std.lexer;
|
||||
|
||||
/**
|
||||
* Template for determining the type used for a token type. Selects the smallest
|
Loading…
Reference in New Issue