Skip to content
Snippets Groups Projects
Commit 88b1d826 authored by Marijn Haverbeke's avatar Marijn Haverbeke
Browse files

[dockerfile mode] Clean up state machine

Issue #2964
parent 183ebcb7
No related branches found
No related tags found
Loading
......@@ -24,14 +24,12 @@
// Block comment: This is a line starting with a comment
{
regex: /#.*$/,
token: "comment",
next: "start"
token: "comment"
},
// Highlight an instruction without any arguments (for convenience)
{
regex: instructionOnlyLine,
token: "variable-2",
next: "start"
token: "variable-2"
},
// Highlight an instruction followed by arguments
{
......@@ -39,10 +37,9 @@
token: ["variable-2", null],
next: "arguments"
},
// Fail-safe return to start
{
token: null,
next: "start"
regex: /./,
token: null
}
],
arguments: [
......@@ -54,8 +51,7 @@
},
{
regex: /[^#]+\\$/,
token: null,
next: "arguments"
token: null
},
{
// Match everything except for the inline comment
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment