diff --git a/manifest.bjodat b/manifest.bjodat index c876856..856fcda 100644 --- a/manifest.bjodat +++ b/manifest.bjodat @@ -1,6 +1,6 @@ (package (name (textmate-bjolang)) - (version "0.1.0") + (version "0.1.1") (description "Syntax highlighting for Bjolang: VS Code's TextMate grammars and themes, through TextMateSharp, as (text xml) nodes.") (license "MPL-2.0") @@ -12,5 +12,9 @@ (packages (nuget (id "TextMateSharp.Grammars") (version "[2.0.4,2.1)"))) + ;; Bjolang's own grammar, read at run time from beside src/. Declared so + ;; that bjo publish copies it along with the module. + (resources "grammars") + ;; A library: there is no src/main.bjo. ) diff --git a/src/core.bjo b/src/core.bjo index 6887491..c347633 100644 --- a/src/core.bjo +++ b/src/core.bjo @@ -36,8 +36,10 @@ ;; - TextMateSharp takes a theme's own rules before the ones it includes, ;; however specific: Light+ colours `this` as a variable, where VS Code ;; gives it the included theme's blue. Both styles here follow TextMateSharp. -;; - The Bjolang grammar is found beside the DLL. A program copied somewhere -;; without grammars/ — what a bjo publish would do — has no bjolang. +;; - The Bjolang grammar is found beside the DLL. The manifest declares +;; grammars/ as a resource, so bjo publish copies it to the same place +;; relative to the module; a program copied by hand without it has no +;; bjolang. ;; - A highlighter tokenizes one line at a time, under a lock: TextMateSharp ;; compiles a grammar's rules as it meets them and says nothing about ;; threads. Parallel work wants a highlighter per thread.