tree-sitter / tree-sitter-css

CSS grammar for Tree-sitter
MIT License
85 stars 34 forks source link

"Undefined symbols for architecture x86_64" error when requiring in another parser #21

Closed matthew-dean closed 1 year ago

matthew-dean commented 2 years ago

I'm attempting to do this to create a Less parser:

const css = require('tree-sitter-css/grammar')
module.exports = grammar(css, { ...

This throws the Undefined symbols error on tree-sitter parse and tree-sitter test. Is this a tree-sitter issue or an issue with the implementation in this repo? Related: https://github.com/tree-sitter/tree-sitter/issues/1497

amaanq commented 1 year ago

you need to copy the scanner over and rename the lang functions to less