aboutsummaryrefslogtreecommitdiffhomepage
path: root/ide/find_phrase.mll
diff options
context:
space:
mode:
Diffstat (limited to 'ide/find_phrase.mll')
-rw-r--r--ide/find_phrase.mll8
1 files changed, 7 insertions, 1 deletions
diff --git a/ide/find_phrase.mll b/ide/find_phrase.mll
index 8a428710a..16d1cd83e 100644
--- a/ide/find_phrase.mll
+++ b/ide/find_phrase.mll
@@ -8,6 +8,12 @@ rule next_phrase = parse
| "(*" { incr length; incr length;
skip_comment lexbuf;
next_phrase lexbuf}
+ | '"'[^'"']*'"' { let lexeme = Lexing.lexeme lexbuf in
+ let ulen = Glib.Utf8.length lexeme in
+ length := !length + ulen;
+ Buffer.add_string buff lexeme;
+ next_phrase lexbuf
+ }
| '.'[' ''\n''\t''\r'] {
length := !length + 2;
Buffer.add_string buff (Lexing.lexeme lexbuf);
@@ -19,7 +25,7 @@ rule next_phrase = parse
Buffer.add_char buff c ;
next_phrase lexbuf
}
- | eof { raise (Lex_error "no phrase") }
+ | eof { raise (Lex_error "Phrase should end with . followed by a separator") }
and skip_comment = parse
| "*)" {incr length; incr length; ()}
| "(*" {incr length; incr length;