diff --git a/analysis/base.d b/analysis/base.d index 58b0c08..c152e1f 100644 --- a/analysis/base.d +++ b/analysis/base.d @@ -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 diff --git a/analysis/constructors.d b/analysis/constructors.d index 2c5d9a5..ed4dd76 100644 --- a/analysis/constructors.d +++ b/analysis/constructors.d @@ -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 diff --git a/analysis/del.d b/analysis/del.d index 60df118..5ef4472 100644 --- a/analysis/del.d +++ b/analysis/del.d @@ -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; /** diff --git a/analysis/enumarrayliteral.d b/analysis/enumarrayliteral.d index 0eae919..6c065ac 100644 --- a/analysis/enumarrayliteral.d +++ b/analysis/enumarrayliteral.d @@ -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) {} diff --git a/analysis/fish.d b/analysis/fish.d index 24bee4b..71309d7 100644 --- a/analysis/fish.d +++ b/analysis/fish.d @@ -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; /** diff --git a/analysis/ifelsesame.d b/analysis/ifelsesame.d index 8d57d11..dc2bcc3 100644 --- a/analysis/ifelsesame.d +++ b/analysis/ifelsesame.d @@ -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; /** diff --git a/analysis/linespan.d b/analysis/linespan.d index cedbef5..ec65cef 100644 --- a/analysis/linespan.d +++ b/analysis/linespan.d @@ -5,7 +5,6 @@ module analysis.linespan; - /** * Used for determining which lines to include as context in the generated HTML * report. diff --git a/analysis/numbers.d b/analysis/numbers.d index b3b209c..da483c1 100644 --- a/analysis/numbers.d +++ b/analysis/numbers.d @@ -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; /** diff --git a/analysis/objectconst.d b/analysis/objectconst.d index ffb4c67..d64c8c4 100644 --- a/analysis/objectconst.d +++ b/analysis/objectconst.d @@ -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; /** diff --git a/analysis/pokemon.d b/analysis/pokemon.d index bc22530..82cb42d 100644 --- a/analysis/pokemon.d +++ b/analysis/pokemon.d @@ -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; /** diff --git a/analysis/range.d b/analysis/range.d index ccce2e6..a30e43d 100644 --- a/analysis/range.d +++ b/analysis/range.d @@ -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; /** diff --git a/analysis/run.d b/analysis/run.d index cd2094b..c86a24a 100644 --- a/analysis/run.d +++ b/analysis/run.d @@ -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; diff --git a/analysis/style.d b/analysis/style.d index 13f9b53..136e2c2 100644 --- a/analysis/style.d +++ b/analysis/style.d @@ -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; diff --git a/astprinter.d b/astprinter.d index 56e5ef5..e1bff6d 100644 --- a/astprinter.d +++ b/astprinter.d @@ -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; diff --git a/build.sh b/build.sh index b00b58f..64d1fdb 100755 --- a/build.sh +++ b/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\ diff --git a/ctags.d b/ctags.d index 69368fc..330f5aa 100644 --- a/ctags.d +++ b/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; diff --git a/formatter.d b/formatter.d index b98ac75..2d8476d 100644 --- a/formatter.d +++ b/formatter.d @@ -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. diff --git a/highlighter.d b/highlighter.d index 3b24e2f..3be4c0c 100644 --- a/highlighter.d +++ b/highlighter.d @@ -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) diff --git a/imports.d b/imports.d index 7fce205..fccadf6 100644 --- a/imports.d +++ b/imports.d @@ -5,7 +5,7 @@ module imports; -import stdx.d.ast; +import std.d.ast; import std.stdio; import std.container; diff --git a/main.d b/main.d index 2d0eb7c..89a822d 100644 --- a/main.d +++ b/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; diff --git a/outliner.d b/outliner.d index 0acbb6d..919d8fc 100644 --- a/outliner.d +++ b/outliner.d @@ -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; diff --git a/stats.d b/stats.d index 533a948..e09d5e5 100644 --- a/stats.d +++ b/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) { diff --git a/stdx/allocator.d b/std/allocator.d similarity index 99% rename from stdx/allocator.d rename to std/allocator.d index 3ae7c8f..d126ac6 100644 --- a/stdx/allocator.d +++ b/std/allocator.d @@ -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 diff --git a/stdx/d/ast.d b/std/d/ast.d similarity index 99% rename from stdx/d/ast.d rename to std/d/ast.d index 4608cac..9e508bf 100644 --- a/stdx/d/ast.d +++ b/std/d/ast.d @@ -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; diff --git a/stdx/d/entities.d b/std/d/entities.d similarity index 99% rename from stdx/d/entities.d rename to std/d/entities.d index 7b967d7..65aa8ce 100644 --- a/stdx/d/entities.d +++ b/std/d/entities.d @@ -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) diff --git a/stdx/d/lexer.d b/std/d/lexer.d similarity index 98% rename from stdx/d/lexer.d rename to std/d/lexer.d index e9e790b..52381e2 100644 --- a/stdx/d/lexer.d +++ b/std/d/lexer.d @@ -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 { diff --git a/stdx/d/parser.d b/std/d/parser.d similarity index 99% rename from stdx/d/parser.d rename to std/d/parser.d index 26e0ef0..65cdc51 100644 --- a/stdx/d/parser.d +++ b/std/d/parser.d @@ -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; diff --git a/stdx/lexer.d b/std/lexer.d similarity index 99% rename from stdx/lexer.d rename to std/lexer.d index 2fc19a8..1072e45 100644 --- a/stdx/lexer.d +++ b/std/lexer.d @@ -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