UDL (User-defined language) request 4: variable string matching (HEREDOC)



  • How to emphasize a HEREDOC syntax?

    For those unaware of this term, it is a way to wrap long lines. The first line should end with <<Name, where Name is any string, then some lines follow, and the last line shall be Name. The first Name can be highlighted with “prefix” syntax. The trick here is to highlight the second Name.

    Example

    ADD( <<END
    1, 
    2
    )
    END
    

    is equivalent to

    ADD(1, 2)
    

    See also https://en.wikipedia.org/wiki/Here_document


Log in to reply