Git Product home page Git Product logo

parigp-lang's Introduction

Hi there ๐Ÿ‘‹

parigp-lang's People

Watchers

 avatar

parigp-lang's Issues

[Bug]: Unexpected capture value from Sublime Text

Sublime Text (ST)

Stable Channel, Build 4169

Issue Description

When adding parigp.tmLanguage into packages directory /path/to/Sublime Text 3/Packages/User/, ST responds with error Unexpected capture value in its Developer Console.
After investigation, I discovered some undocumented requirements for ST to accept tmLanguage PLIST containing TextMate language grammar. Please, find them below as path to fix.

  1. tmLanguage PLIST doesn't support nested repository tags and nested patterns for capture blocks.
  2. ST uses Python regex that doesn't support variable length patterns for look-behinds.

[Bug]: Wrong syntax parsing if code calls the anonymous lambda

The test below results into wrong syntax parsing. Checked against VSCode 1.89.0 by its built-in scope inspector. VSIX package was built with vsce of version 2.26.1.

## SYNTAX TEST "source.parigp" "Functions"

  v = ((y, z) -> y^2 + z^2)(10);
##                        ^ source.parigp meta.function.lambda.parigp meta.parens.parigp punctuation.section.parens.end.parigp
##                         ^ source.parigp meta.function.lambda.parigp meta.parens.parigp punctuation.section.parens.begin.parigp

  \q
##^ source.parigp meta.function.lambda.parigp keyword.operator.arithmetic.parigp
## ^ source.parigp meta.function.lambda.parigp variable.parameter.function.parigp

As I discovered, if any grammar rule having begin and end keys has nested sub-rules, then it would start looking for end pattern match only after all sub-rules were applied. That's why scope meta.function.lambda.parigp doesn't end at -> as it was expected in code.

FYI, this behavior is not described at TextMate's official documentation.

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.