diff options
| author | nyamatongwe <unknown> | 2011-05-25 18:41:15 +1000 | 
|---|---|---|
| committer | nyamatongwe <unknown> | 2011-05-25 18:41:15 +1000 | 
| commit | 1ef9f42a4e839bf12d454e8560e7d697e1e3b0c9 (patch) | |
| tree | cb7b8c10f07c954ecc3ea933193c7ffbb1888d10 | |
| parent | f36e1e02a72382601d41aa18a026d6836a59aa0d (diff) | |
| download | scintilla-mirror-1ef9f42a4e839bf12d454e8560e7d697e1e3b0c9.tar.gz | |
Update to support SystemVerilog.
| -rw-r--r-- | lexers/LexVerilog.cxx | 30 | 
1 files changed, 21 insertions, 9 deletions
| diff --git a/lexers/LexVerilog.cxx b/lexers/LexVerilog.cxx index 8de04ff7f..ed39c2b17 100644 --- a/lexers/LexVerilog.cxx +++ b/lexers/LexVerilog.cxx @@ -29,7 +29,7 @@ using namespace Scintilla;  #endif  static inline bool IsAWordChar(const int ch) { -	return (ch < 0x80) && (isalnum(ch) || ch == '.' || ch == '_' || ch == '\''); +	return (ch < 0x80) && (isalnum(ch) || ch == '.' || ch == '_' || ch == '\''|| ch == '$');  }  static inline bool IsAWordStart(const int ch) { @@ -269,24 +269,36 @@ static void FoldNoBoxVerilogDoc(unsigned int startPos, int length, int initStyle                          if (styler.Match(j, "case") ||                              styler.Match(j, "casex") ||                              styler.Match(j, "casez") || +                            styler.Match(j, "class") ||                              styler.Match(j, "function") || -                            styler.Match(j, "fork") || -                            styler.Match(j, "table") || -                            styler.Match(j, "task") ||                              styler.Match(j, "generate") || -                            styler.Match(j, "specify") || +                            styler.Match(j, "covergroup") || +                            styler.Match(j, "package") ||                              styler.Match(j, "primitive") || +                            styler.Match(j, "program") || +                            styler.Match(j, "sequence") || +                            styler.Match(j, "specify") || +                            styler.Match(j, "table") || +                            styler.Match(j, "task") || +                            styler.Match(j, "fork") ||                              (styler.Match(j, "module") && foldAtModule) ||                              styler.Match(j, "begin")) {                                  levelNext++;                          } else if (styler.Match(j, "endcase") || +                                   styler.Match(j, "endclass") ||                                     styler.Match(j, "endfunction") || -                                   styler.Match(j, "join") || -                                   styler.Match(j, "endtask") ||                                     styler.Match(j, "endgenerate") || -                                   styler.Match(j, "endtable") || -                                   styler.Match(j, "endspecify") || +                                   styler.Match(j, "endgroup") || +                                   styler.Match(j, "endpackage") ||                                     styler.Match(j, "endprimitive") || +                                   styler.Match(j, "endprogram") || +                                   styler.Match(j, "endsequence") || +                                   styler.Match(j, "endspecify") || +                                   styler.Match(j, "endtable") || +                                   styler.Match(j, "endtask") || +                                   styler.Match(j, "join") || +                                   styler.Match(j, "join_any") || +                                   styler.Match(j, "join_none") ||                                     (styler.Match(j, "endmodule") && foldAtModule) ||                                     (styler.Match(j, "end") && !IsAWordChar(styler.SafeGetCharAt(j+3)))) {                                  levelNext--; | 
