Fix tree-sitter generation with make
This commit is contained in:
parent
7f3a662cbc
commit
417b427f6d
@ -1,7 +1,3 @@
|
||||
SITTER ?= tree-sitter
|
||||
|
||||
DIRS := pascaligo reasonligo camligo
|
||||
|
||||
PACKAGE := squirrel
|
||||
|
||||
STACK_DEV_OPTIONS = --fast --ghc-options -Wwarn --file-watch
|
||||
@ -12,19 +8,13 @@ all: build
|
||||
|
||||
FORCE:
|
||||
|
||||
generate: $(DIRS)
|
||||
|
||||
$(DIRS): FORCE
|
||||
# $(SITTER) generate # Generation is manual for now
|
||||
# mkdir -p $(PACKAGE)/vendor/$@
|
||||
# cp grammar/$@/src/parser.c vendor/$@/parser.c
|
||||
# cp -r grammar/$@/src/tree_sitter vendor/$@/tree_sitter
|
||||
grammar: ; $(MAKE) -C $@
|
||||
|
||||
clean:
|
||||
$(RM) vendor/*
|
||||
stack clean
|
||||
|
||||
build:
|
||||
build: grammar
|
||||
stack build $(STACK_DEV_OPTIONS)
|
||||
|
||||
.PHONY: all clean generate build FORCE
|
||||
.PHONY: all clean grammar build FORCE
|
||||
|
7
tools/lsp/squirrel/grammar/Makefile
Normal file
7
tools/lsp/squirrel/grammar/Makefile
Normal file
@ -0,0 +1,7 @@
|
||||
DIRS = $(wildcard */.)
|
||||
|
||||
generate: $(DIRS)
|
||||
|
||||
$(DIRS): ; $(MAKE) -C $@
|
||||
|
||||
.PHONY: generate $(DIRS)
|
1
tools/lsp/squirrel/grammar/camligo/Makefile
Normal file
1
tools/lsp/squirrel/grammar/camligo/Makefile
Normal file
@ -0,0 +1 @@
|
||||
include ../parser.mk
|
1
tools/lsp/squirrel/grammar/parser.mk
Normal file
1
tools/lsp/squirrel/grammar/parser.mk
Normal file
@ -0,0 +1 @@
|
||||
src/parser.c: grammar.js; tree-sitter generate
|
5
tools/lsp/squirrel/grammar/pascaligo/Makefile
Normal file
5
tools/lsp/squirrel/grammar/pascaligo/Makefile
Normal file
@ -0,0 +1,5 @@
|
||||
include ../parser.mk
|
||||
|
||||
test: src/parser.c; tree-sitter parse test.ligo
|
||||
|
||||
.PHONY: test
|
@ -1 +0,0 @@
|
||||
Some(Unit) # Some(Foo(Bar, Unit))
|
1
tools/lsp/squirrel/grammar/pascaligo/test.ligo
Symbolic link
1
tools/lsp/squirrel/grammar/pascaligo/test.ligo
Symbolic link
@ -0,0 +1 @@
|
||||
../../../../../src/test/examples/pascaligo/arithmetic-contract.ligo
|
1
tools/lsp/squirrel/grammar/reasonligo/Makefile
Normal file
1
tools/lsp/squirrel/grammar/reasonligo/Makefile
Normal file
@ -0,0 +1 @@
|
||||
include ../parser.mk
|
Loading…
Reference in New Issue
Block a user