Skip to content

Commit

Permalink
refactor: remove libdparse in tokens.d
Browse files Browse the repository at this point in the history
Signed-off-by: Prajwal S N <[email protected]>
  • Loading branch information
snprajwal committed Sep 15, 2023
1 parent 1e765fb commit 43b2e48
Show file tree
Hide file tree
Showing 6 changed files with 208 additions and 180 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@
[submodule "d-test-utils"]
path = d-test-utils
url = https://github.com/dlang-community/d-test-utils.git
[submodule "dmd"]
path = dmd
url = https://github.com/dlang/dmd.git
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ when using the **--inplace** option.

### Building from source using Make
* Clone the repository
* Run ```git submodule update --init --recursive``` in the dfmt directory
* To compile with DMD, run ```make``` in the dfmt directory. To compile with
LDC, run ```make ldc``` instead. The generated binary will be placed in ```dfmt/bin/```.
* Run `git submodule update --init --recursive` in the dfmt directory
* To compile with DMD, run `make` in the dfmt directory. To compile with
LDC, run `make ldc` instead. The generated binary will be placed in `dfmt/bin/`.

### Building from source using dub
* Clone the repository
Expand Down Expand Up @@ -68,8 +68,8 @@ dfmt --inplace --space_after_cast=false --max_line_length=80 \
```

## Disabling formatting
Formatting can be temporarily disabled by placing the comments ```// dfmt off```
and ```// dfmt on``` around code that you do not want formatted.
Formatting can be temporarily disabled by placing the comments `// dfmt off`
and `// dfmt on` around code that you do not want formatted.

```d
void main(string[] args)
Expand Down
1 change: 1 addition & 0 deletions dmd
Submodule dmd added at b85910
5 changes: 4 additions & 1 deletion dub.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
"targetType": "autodetect",
"license": "BSL-1.0",
"dependencies": {
"libdparse": ">=0.19.2 <1.0.0"
"libdparse": ">=0.19.2 <1.0.0",
"dmd": {
"repository": "git+https://github.com/dlang/dmd.git"
}
},
"targetPath" : "bin/",
"targetName" : "dfmt",
Expand Down
4 changes: 2 additions & 2 deletions makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
SRC := $(shell find src -name "*.d") \
$(shell find libdparse/src -name "*.d") \
$(shell find stdx-allocator/source -name "*.d")
INCLUDE_PATHS := -Ilibdparse/src -Istdx-allocator/source -Isrc -Jbin
DMD_COMMON_FLAGS := -dip25 -w $(INCLUDE_PATHS)
INCLUDE_PATHS := -Ilibdparse/src -Istdx-allocator/source -Isrc -Idmd/compiler/src -Jbin
DMD_COMMON_FLAGS := -w $(INCLUDE_PATHS)
DMD_DEBUG_FLAGS := -debug -g $(DMD_COMMON_FLAGS)
DMD_FLAGS := -O -inline $(DMD_COMMON_FLAGS)
DMD_TEST_FLAGS := -unittest -g $(DMD_COMMON_FLAGS)
Expand Down
Loading

0 comments on commit 43b2e48

Please sign in to comment.