Conflicts:
	std/d/parser.d
This commit is contained in:
Hackerpilot 2014-05-01 15:24:23 -07:00
commit 867f8b426c
6 changed files with 13 additions and 14 deletions

View File

@ -19,7 +19,7 @@ The following examples assume that we are analyzing a simple file called hellowo
### Token Count
The "--tokenCount" or "-t" option prints the number of tokens in the given file
$ dscanner --tokencount helloworld.d
$ dscanner --tokenCount helloworld.d
20
### Import Listing
@ -198,6 +198,6 @@ but not yet implemented.
# Useful code
The source code for DScanner has a complete lexer, parser, and abstact syntax
tree library for D code under the stdx/d/ directory. It is intended that these
tree library for D code under the std/d/ directory. It is intended that these
modules eventually end up in Phobos, so feel free to use them for your own D
tools.

View File

@ -24,8 +24,8 @@ dmd\
# astprinter.d\
# formatter.d\
# outliner.d\
# stdx/*.d\
# stdx/d/*.d\
# std/*.d\
# std/d/*.d\
# analysis/*.d\
# -O3 -frelease -fno-bounds-check\
# -odscanner\
@ -39,8 +39,8 @@ dmd\
# astprinter.d\
# formatter.d\
# outliner.d\
# stdx/*.d\
# stdx/d/*.d\
# std/*.d\
# std/d/*.d\
# analysis/*.d\
# -O3 -release\
# -oq -of=dscanner\

View File

@ -9,7 +9,7 @@
{
"name": "library",
"targetType": "library",
"sourcePaths": ["stdx"],
"sourcePaths": ["std"],
},
{
"name": "dscanner",

View File

@ -2860,7 +2860,7 @@ private struct BasicRegion(uint minAlign = platformAlignment)
static if (minAlign > 1)
{
auto newStore = cast(void*) roundUpToMultipleOf(
cast(ulong) store.ptr,
cast(size_t) store.ptr,
alignment);
assert(newStore <= store.ptr + store.length);
_current = newStore;
@ -2904,7 +2904,7 @@ private struct BasicRegion(uint minAlign = platformAlignment)
// Just bump the pointer to the next good allocation
auto save = _current;
_current = cast(void*) roundUpToMultipleOf(
cast(ulong) _current, a);
cast(size_t) _current, a);
if (auto b = allocate(bytes)) return b;
// Failed, rollback
_current = save;
@ -3064,7 +3064,7 @@ struct InSituRegion(size_t size, size_t minAlign = platformAlignment)
{
assert(!_crt);
_crt = cast(void*) roundUpToMultipleOf(
cast(ulong) _store.ptr, alignment);
cast(size_t) _store.ptr, alignment);
_end = _store.ptr + _store.length;
}
@ -3109,7 +3109,7 @@ struct InSituRegion(size_t size, size_t minAlign = platformAlignment)
// Just bump the pointer to the next good allocation
auto save = _crt;
_crt = cast(void*) roundUpToMultipleOf(
cast(ulong) _crt, a);
cast(size_t) _crt, a);
if (auto b = allocate(bytes)) return b;
// Failed, rollback
_crt = save;

View File

@ -1990,7 +1990,6 @@ class ClassFour(A, B) if (someTest()) : Super {}}c;
while(moreTokens() && currentIsMemberFunctionAttribute())
memberFunctionAttributes ~= parseMemberFunctionAttribute();
node.memberFunctionAttributes = ownArray(memberFunctionAttributes);
node.functionBody = parseFunctionBody();
}
return node;
@ -2285,7 +2284,7 @@ class ClassFour(A, B) if (someTest()) : Super {}}c;
{
if (!canBeRange)
{
error(`Cannot have more than one foreach varible for a foreach range statement`);
error(`Cannot have more than one foreach variable for a foreach range statement`);
return null;
}
advance();

View File

@ -33,7 +33,7 @@
* )
* Examples:
* $(UL
* $(LI A _lexer for D is available $(LINK2 https://github.com/Hackerpilot/Dscanner/blob/master/stdx/d/lexer.d, here).)
* $(LI A _lexer for D is available $(LINK2 https://github.com/Hackerpilot/Dscanner/blob/master/std/d/lexer.d, here).)
* $(LI A _lexer for Lua is available $(LINK2 https://github.com/Hackerpilot/lexer-demo/blob/master/lualexer.d, here).)
* $(LI A _lexer for JSON is available $(LINK2 https://github.com/Hackerpilot/lexer-demo/blob/master/jsonlexer.d, here).)
* )