Skip to content

Commit

Permalink
GraphPlanar: Fix the highlighter.
Browse files Browse the repository at this point in the history
Comment used to be ignored. They are now in the Hidden channel.
  • Loading branch information
ArthurSonzogni committed May 8, 2023
1 parent 4badcfc commit 3a4a549
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@
- See CVE-2023-31194. Do not add twice an edge in the graph. This caused Boost
algorithms to misbehave.

## Bug fix
- Fix highlighter for the GraphPlanar translator.

## Build
- Set MSVC_RUNTIME_LIBRARY to /MT for static builds
10 changes: 5 additions & 5 deletions src/translator/graph_planar/GraphPlanar.g4
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
grammar GraphPlanar;

// Ignored TOKENS
WS: [ \t]+ -> channel(HIDDEN);
COMMENT: '/*' .*? '*/' -> channel(HIDDEN);
LINE_COMMENT: '//' .*? ('\r'? '\n' | EOF) -> channel(HIDDEN);

graph: EOL* edges (EOL+ edges)* EOL* EOF;
edges: node (arrow node)+;
arrow: RIGHT_ARROW | NONE_ARROW | LEFT_RIGHT_ARROW | LEFT_ARROW;
Expand All @@ -16,9 +21,4 @@ fragment LETTER: ~[ \t\n\r\-<>"];
EOL: '\r\n' | '\n';
// Ignored TOKENS
WS: [ \t] -> skip;
COMMENT: '/*' .*? '*/' -> skip;
LINE_COMMENT: '//' .*? '\r'? '\n' -> skip;
// vim: filetype=antlr

0 comments on commit 3a4a549

Please sign in to comment.