Navigation

    Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    An annoying issue with UDL

    Help wanted · · · – – – · · ·
    syntax highligh user-defined la udl
    2
    2
    96
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Wunder Wulfe
      Wunder Wulfe last edited by

      So, I’ve been messing around and setting up the highlighting for my own language but I ran into a problem where the end statements would not be colored properly although they were correctly categorized.

      https://puu.sh/EdpCX/f881002861.png

      The end statement for the for loop is dark purple when it should be a maroon color. How would I fix this and is there any better alternative?

      1 Reply Last reply Reply Quote 0
      • PeterJones
        PeterJones last edited by

        @Wunder-Wulfe said:

        The end statement for the for loop is dark purple when it should be a maroon color.

        because the UDL lexer cannot differentiate between “end (after func)” and “end (after for)”, because by that point in the lexing, I believe all it sees is “end”, and has lost the context of “(after ___)”.

        Using UDL, I don’t think you can fix it, and I don’t think there is an alternative. But I could be wrong, and someone else can feel free to chime in.

        1 Reply Last reply Reply Quote 1
        • First post
          Last post
        Copyright © 2014 NodeBB Forums | Contributors