-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable JuliaSyntax.jl as the defult parser
* Vendor JuliaSyntax into Base via deps directory * Install JuliaSyntax as the Julia parser unless the environment variable JULIA_USE_NEW_PARSER=0 is set. * Add a function to set the Core._parse binding. Required because we'd like to set the binding during Base.__init__. This can be done with `Core.eval` but that doesn't work well in incremental compilation mode. Also accommodate JuliaSyntax within tests: * When JuliaSyntax is enabled, ignore error messages in parser tests which are tested separately upstream - error messages are inherently expressed a bit differently when they go alongside full source location info. * Accommodate a small number of incompatibilities where in JuliaSyntax - `import .Mod.x as (a.b)` is a syntax not lowering error - `f(2x for x=1:10, y` is `Expr(:incomplete)` not `Expr(:error)` - `incomplete_tag` is more precise for `:block` vs `:other` - `global const` without an assignment is a syntax error, in keeping with plain `const` without assignment being a syntax error (not lowering error). * Adjust a few tests to be more precise about testing lowering vs the parser. * Make Meta.parse doctest compatible with JuliaSyntax errors
- Loading branch information
Showing
17 changed files
with
272 additions
and
225 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,4 @@ | |
/version_git.jl | ||
/version_git.jl.phony | ||
/userimg.jl | ||
/JuliaSyntax |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
$(eval $(call git-external,JuliaSyntax,JULIASYNTAX,,,$(BUILDDIR))) | ||
|
||
$(BUILDDIR)/$(JULIASYNTAX_SRC_DIR)/build-compiled: $(BUILDDIR)/$(JULIASYNTAX_SRC_DIR)/source-extracted | ||
@# no build steps | ||
echo 1 > $@ | ||
|
||
$(eval $(call symlink_install,JuliaSyntax,$$(JULIASYNTAX_SRC_DIR),$$(JULIAHOME)/base)) | ||
|
||
clean-JuliaSyntax: | ||
-rm -f $(BUILDDIR)/$(JULIASYNTAX_SRC_DIR)/build-compiled | ||
get-JuliaSyntax: $(JULIASYNTAX_SRC_FILE) | ||
extract-JuliaSyntax: $(BUILDDIR)/$(JULIASYNTAX_SRC_DIR)/source-extracted | ||
configure-JuliaSyntax: extract-JuliaSyntax | ||
compile-JuliaSyntax: $(BUILDDIR)/$(JULIASYNTAX_SRC_DIR)/build-compiled | ||
fastcheck-JuliSyntax: check-JuliSyntax | ||
check-JuliSyntax: compile-JuliSyntax |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
JULIASYNTAX_BRANCH = main | ||
JULIASYNTAX_SHA1 = ec51994833d78f8c5525bc1647f448dfadc370c1 | ||
JULIASYNTAX_GIT_URL := https://github.com/JuliaLang/JuliaSyntax.jl.git | ||
JULIASYNTAX_TAR_URL = https://api.github.com/repos/JuliaLang/JuliaSyntax.jl/tarball/$1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
deps/checksums/JuliaSyntax-ec51994833d78f8c5525bc1647f448dfadc370c1.tar.gz/md5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
b1d1ccb00e422eb8b70b2120d7083bf3 |
1 change: 1 addition & 0 deletions
1
deps/checksums/JuliaSyntax-ec51994833d78f8c5525bc1647f448dfadc370c1.tar.gz/sha512
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
e6df6dc2b5d2a5618da0d553eed793e1192147175d84d51f725c0ea8f7b6be92fbeb37de9abee2b2f548b0f0736f836ec7e3e20e93c12f77e1a2b2058bbfd6db |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.