Navigation

    Community

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

    How to do variable (and function) highlighting for my own language?

    Help wanted · · · – – – · · ·
    udl2
    2
    2
    1690
    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.
    • Steven Van Ingelgem
      Steven Van Ingelgem last edited by

      In my language, I have variables which are either defined by dim or by prefixing it by @ (implicit variable definition).

      I want to add this syntax highlighting to Notepad++, but I think for the dim, I’m out of luck. But I tried with @, and it’s working, but it’s highlighting the whole line (for example @Var.$id highlights everything, except what I want is everything up to the first .). How could I do this?

      Example:

      @JobListObject = @Node.call("Instantiate", @jblistClass.$id, $self.$id);
      

      I want Notepad++ to highlight all of the following:

      • @JobListObject
      • @Node (without the .call)
      • @jblistClass (without the .$id)
      • $self
      • $id
      • call()

      Is there a way to do this?

      [I know if I switch to Perl language, it looks fine, but I want to define this myself so I can add specific language constructs as well as autocomplete]

      Thanks!

      1 Reply Last reply Reply Quote 0
      • Jim Dailey
        Jim Dailey last edited by

        You could try adding “.” as an operator.

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