minor cleanup
This commit is contained in:
parent
2569c80893
commit
aedf58eb81
2
build.sh
2
build.sh
|
@ -1,5 +1,5 @@
|
||||||
#dmd *.d stdx/d/*.d -release -inline -noboundscheck -O -w -wi -m64 -property -ofdscanner-dmd
|
#dmd *.d stdx/d/*.d -release -inline -noboundscheck -O -w -wi -m64 -property -ofdscanner-dmd
|
||||||
dmd main.d stats.d imports.d highlighter.d ctags.d astprinter.d formatter.d outliner.d stdx/*.d stdx/d/*.d -g -m64 -wi -ofdscanner
|
dmd main.d stats.d imports.d highlighter.d ctags.d astprinter.d formatter.d outliner.d stdx/*.d stdx/d/*.d -g -m64 -wi -ofdscanner
|
||||||
#ldc2 -O3 *.d stdx/d/*.d -of=dscanner-ldc -release -m64
|
#ldc2 main.d stats.d imports.d highlighter.d ctags.d astprinter.d formatter.d outliner.d stdx/*.d stdx/d/*.d -O3 -of=dscanner-ldc -release -m64 -oq
|
||||||
#ldc2 *.d stdx/d/*.d -of=dscanner -unittest -m64 -g
|
#ldc2 *.d stdx/d/*.d -of=dscanner -unittest -m64 -g
|
||||||
#/opt/gdc/bin/gdc -O3 -odscanner-gdc -fno-bounds-check -frelease -m64 *.d stdx/d/*.d
|
#/opt/gdc/bin/gdc -O3 -odscanner-gdc -fno-bounds-check -frelease -m64 *.d stdx/d/*.d
|
||||||
|
|
20
stdx/lexer.d
20
stdx/lexer.d
|
@ -94,7 +94,7 @@ struct TokenStructure(IDType)
|
||||||
{
|
{
|
||||||
this.type = type;
|
this.type = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
this(IDType type, string text, size_t line, size_t column, size_t index)
|
this(IDType type, string text, size_t line, size_t column, size_t index)
|
||||||
{
|
{
|
||||||
this.text = text;
|
this.text = text;
|
||||||
|
@ -167,7 +167,7 @@ mixin template Lexer(R, IDType, Token, alias isSeparating, alias defaultTokenFun
|
||||||
}
|
}
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
||||||
static string generateLeaf(string token, string indent)
|
static string generateLeaf(string token, string indent)
|
||||||
{
|
{
|
||||||
string code;
|
string code;
|
||||||
|
@ -261,9 +261,9 @@ mixin template Lexer(R, IDType, Token, alias isSeparating, alias defaultTokenFun
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This only exists because the real array() can't be called at compile-time
|
* This only exists because the real array() can't be called at compile-time
|
||||||
*/
|
*/
|
||||||
static T[] stupidToArray(R, T = ElementType!R)(R range)
|
static T[] stupidToArray(R, T = ElementType!R)(R range)
|
||||||
{
|
{
|
||||||
T[] rVal;
|
T[] rVal;
|
||||||
|
@ -312,7 +312,7 @@ public:
|
||||||
_index++;
|
_index++;
|
||||||
_column++;
|
_column++;
|
||||||
}
|
}
|
||||||
|
|
||||||
void popFrontN(size_t n) pure nothrow
|
void popFrontN(size_t n) pure nothrow
|
||||||
{
|
{
|
||||||
foreach (i; 0 .. n)
|
foreach (i; 0 .. n)
|
||||||
|
@ -353,13 +353,13 @@ public:
|
||||||
{
|
{
|
||||||
return range[markBegin .. index];
|
return range[markBegin .. index];
|
||||||
}
|
}
|
||||||
|
|
||||||
void incrementLine() pure nothrow
|
void incrementLine() pure nothrow
|
||||||
{
|
{
|
||||||
_column = 1;
|
_column = 1;
|
||||||
_line++;
|
_line++;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t line() pure nothrow const @property { return _line; }
|
size_t line() pure nothrow const @property { return _line; }
|
||||||
size_t column() pure nothrow const @property { return _column; }
|
size_t column() pure nothrow const @property { return _column; }
|
||||||
size_t index() pure nothrow const @property { return _index; }
|
size_t index() pure nothrow const @property { return _index; }
|
||||||
|
@ -461,13 +461,13 @@ private:
|
||||||
// marking = false;
|
// marking = false;
|
||||||
// return markBuffer.data;
|
// return markBuffer.data;
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// void incrementLine() pure nothrow
|
// void incrementLine() pure nothrow
|
||||||
// {
|
// {
|
||||||
// _column = 1;
|
// _column = 1;
|
||||||
// _line++;
|
// _line++;
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// size_t line() pure nothrow const @property { return _line; }
|
// size_t line() pure nothrow const @property { return _line; }
|
||||||
// size_t column() pure nothrow const @property { return _column; }
|
// size_t column() pure nothrow const @property { return _column; }
|
||||||
// size_t index() pure nothrow const @property { return _index; }
|
// size_t index() pure nothrow const @property { return _index; }
|
||||||
|
|
Loading…
Reference in New Issue