diff --git a/README.md b/README.md index 1c1ac31..f2b72a1 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/build.sh b/build.sh index 1a4c7de..2b3cd32 100755 --- a/build.sh +++ b/build.sh @@ -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\ diff --git a/dub.json b/dub.json index 086d89e..c67d6fb 100644 --- a/dub.json +++ b/dub.json @@ -9,7 +9,7 @@ { "name": "library", "targetType": "library", - "sourcePaths": ["stdx"], + "sourcePaths": ["std"], }, { "name": "dscanner", diff --git a/std/allocator.d b/std/allocator.d index b8ae114..f9c5796 100644 --- a/std/allocator.d +++ b/std/allocator.d @@ -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; diff --git a/std/d/parser.d b/std/d/parser.d index 6169229..1f4ee0b 100644 --- a/std/d/parser.d +++ b/std/d/parser.d @@ -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(); diff --git a/std/lexer.d b/std/lexer.d index 1072e45..84fd384 100644 --- a/std/lexer.d +++ b/std/lexer.d @@ -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).) * )