Kapiainen / SublimePapyrus

A Sublime Text 2 and 3 package for the Papyrus scripting language.
MIT License
47 stars 8 forks source link

Syntax highlighter is broken by backslash string delimiter. #12

Closed Scrivener07 closed 8 years ago

Scrivener07 commented 8 years ago

Here is a sample of some papyrus code that breaks the syntax highlighter.

;1 = Newline
;2 = Tab
;3 = Double quote
;4 = Backslash
string Function GetDelimiter(int aiDelimiter = 1) Global
    If(aiDelimiter == 1)
        return "\n"
    ElseIf(aiDelimiter == 2)
        return "\t"
    ElseIf(aiDelimiter == 3)
        return "\""
    ElseIf(aiDelimiter == 4)
        return "\\"
        return "\\" ; this fixes the sublime syntax highlighter
    Else
        return ""
    EndIf
EndFunction

I use this silly function solely to prevent the highlighter from breaking. If you remove the extra return then everything under that line will use the yellow "string" highlighting.

Kapiainen commented 8 years ago

This has been fixed in the rewrite that I'm currently working on.