Git Product home page Git Product logo

Comments (4)

simonrepp avatar simonrepp commented on July 17, 2024

I've encountered this myself - if I remember correctly:

  • You can comment out the affected lines for the time being if you just want to work on stuff (that's what I did so far), these are more exotic whitespace cases which of course matter, but are irrelevant for the overall implementation and general testing.
  • It only occurrs in certain compilation scenarios (when building for the wasm target?)
  • I don't have a solution yet!
  • If you find one I'd be much obliged :)

In any case, thanks for the report! Glad about your interest in this, let me know if you have more questions and/or issues!

from tree-sitter-eno.

patrickt avatar patrickt commented on July 17, 2024

I fixed it by removing the character syntax:

  inline bool is_horizontal_whitespace(TSLexer *lexer) {
    return lexer->lookahead == ' ' ||
           lexer->lookahead == '\t' ||
           lexer->lookahead == 0xFEFF ||
           lexer->lookahead == 0x2060 ||
           lexer->lookahead == 0x200B;
  }

from tree-sitter-eno.

maxbrunsfeld avatar maxbrunsfeld commented on July 17, 2024

Yeah, I don't think '\uFEFF' is a valid C/C++ expression. Single quoted character literals are of type char, which is almost always an 8-bit value. The largest numerical char value is 0xFF.

In more recent versions of C++, you can use a U prefix (e.g. U'\uFEFF'). I think the normal way to write numbers like this is to just use integer syntax, like @patrickt said ☝️ .

from tree-sitter-eno.

simonrepp avatar simonrepp commented on July 17, 2024

Very cool, thanks patrick for the fix and max for the additional insight, appreciate it!

Commited in c059967

from tree-sitter-eno.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.