Commit ef885e07 authored by Francis Dupont's avatar Francis Dupont Committed by Tomek Mrugalski
Browse files

[5014] Count embbeded \n in comments

parent 2541bd4d
...@@ -116,7 +116,7 @@ JSONString \"{JSONStringCharacter}*\" ...@@ -116,7 +116,7 @@ JSONString \"{JSONStringCharacter}*\"
} }
<COMMENT>"*/" BEGIN(INITIAL); <COMMENT>"*/" BEGIN(INITIAL);
<COMMENT>.|"\n" ; <COMMENT>. ;
<COMMENT><<EOF>> { <COMMENT><<EOF>> {
isc_throw(isc::BadValue, "Comment not closed. (/* in line " << comment_start_line); isc_throw(isc::BadValue, "Comment not closed. (/* in line " << comment_start_line);
} }
...@@ -125,6 +125,7 @@ JSONString \"{JSONStringCharacter}*\" ...@@ -125,6 +125,7 @@ JSONString \"{JSONStringCharacter}*\"
// Ok, we found a with space. Let's ignore it and update loc variable. // Ok, we found a with space. Let's ignore it and update loc variable.
loc.step(); loc.step();
} }
[\n]+ { [\n]+ {
// Newline found. Let's update the location and continue. // Newline found. Let's update the location and continue.
loc.lines(yyleng); loc.lines(yyleng);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment