Skip to content

Commit

Permalink
add build instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
LdBeth committed Dec 31, 2023
1 parent 33324b3 commit f9f2030
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
TREE_CLI := $(HOME)/.cargo/bin/tree-sitter
TREE_CLI := tree-sitter
EXAMPLE := examples/test.rnc
LIBEXT := dylib
TARGET := libtree-sitter-rnc.$(LIBEXT)
Expand Down
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@ Based on https://relaxng.org/compact.html with
the attempt to make the grammar more readable when
avoid ambiguity.

# Installation

This requires the Emacs 29 builtin `treesit.el` support.
Compile and install the `libtree-sitter-rnc.$(LIBEXT)`
to `treesit` search path, e.g. `~/.emacs.d/tree-sitter/`.

```
$ cc -fPIC -c -Isrc src/parser.c
$ cc -fPIC -shared parser.o -o libtree-sitter-rnc.so
```

Copy `emacs/rnc-ts-mode.el` to Emacs load path.

# Copying

This program is free software: you can redistribute it and/or modify
Expand Down

0 comments on commit f9f2030

Please sign in to comment.