[vala] ccode: Fix line breaking of string literals with octal escape sequences
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] ccode: Fix line breaking of string literals with octal escape sequences
- Date: Mon, 30 May 2011 19:14:34 +0000 (UTC)
commit 689cbbb80396fc099e75c56f145ea77610dfcc35
Author: Jürg Billeter <j bitron ch>
Date: Mon May 30 21:11:49 2011 +0200
ccode: Fix line breaking of string literals with octal escape sequences
ccode/valaccodeconstant.vala | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/ccode/valaccodeconstant.vala b/ccode/valaccodeconstant.vala
index 85e63c7..a337723 100644
--- a/ccode/valaccodeconstant.vala
+++ b/ccode/valaccodeconstant.vala
@@ -74,6 +74,20 @@ public class Vala.CCodeConstant : CCodeExpression {
p++;
}
break;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ // octal character
+ while (p < end && p - begin_of_char <= 3 && *p >= '0' && *p <= '7') {
+ builder.append_c (*p);
+ p++;
+ }
+ break;
case 'n':
// break line at \n
col = LINE_LENGTH;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]