Commit cd4c6131 authored by Jürg Billeter's avatar Jürg Billeter Committed by Jürg Billeter

Fix line number calculation for verbatim strings, fixes bug 537123

2008-06-15  Jürg Billeter  <j@bitron.ch>

	* vala/valascanner.vala:

	Fix line number calculation for verbatim strings, fixes bug 537123

svn path=/trunk/; revision=1588
parent fd58a82b
2008-06-15 Jürg Billeter <j@bitron.ch>
* vala/valascanner.vala:
Fix line number calculation for verbatim strings, fixes bug 537123
2008-06-15 Jürg Billeter <j@bitron.ch>
* vapi/packages/gtk+-2.0/:
......
......@@ -621,7 +621,12 @@ public class Vala.Scanner : Object {
while (current < end - 4) {
if (current[0] == '"' && current[1] == '"' && current[2] == '"') {
break;
}
} else if (current[0] == '\n') {
current++;
line++;
column = 1;
token_length_in_chars = 3;
} else {
unichar u = ((string) current).get_char_validated ((long) (end - current));
if (u != (unichar) (-1)) {
current += u.to_utf8 (null);
......@@ -630,6 +635,7 @@ public class Vala.Scanner : Object {
Report.error (new SourceReference (source_file, line, column + token_length_in_chars, line, column + token_length_in_chars), "invalid UTF-8 character");
}
}
}
if (current[0] == '"' && current[1] == '"' && current[2] == '"') {
current += 3;
} else {
......
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