MagicStack/MagicPython

Syntax Highlighting Error - Inconsistent Scoping for Keywords

jrd404 opened this issue · 0 comments

  • Editor name and version:
  • Sublime Text 3
  • Version 3.2.2, Build 3211
  • Platform:
  • MacOS (Catalina)
  • Color scheme:

Link to a repository with my slightly customized color schemes.

They are slight variations to the Material and Materialize color schemes.

  • MagicPython version: 1.1.1 (according to my package.json)

  • A screenshot:

Screen Shot 2020-06-23 at 10 50 03 PM

  • 5-10 lines of surrounding code:
def syntax_bug(example):
    # When code scoped as `keyword.operator.logical.python` are
    # used outside the scope of `meta.function-call.*.python`,
    # the keywords
    if "keywords" not in "function-call":
        print("logical operator keywords highlight correctly")

    # `is` and `not` are scoped as `keyword.control.flow.python`
    # when used inside a function-call
    if "keywords" in "function-call":
        print(
            "keyword highlighting" is not "yellowish-green"
            or "greenish-yellow"
        )

    outside_function_call = (
        "keyword highlighting" is not "yellowish-green" or "greenish-yellow"
    )

    return outside_function_call