vala r1633 - in trunk: . vala
- From: jamiemcc svn gnome org
- To: svn-commits-list gnome org
- Subject: vala r1633 - in trunk: . vala
- Date: Mon, 23 Jun 2008 02:38:56 +0000 (UTC)
Author: jamiemcc
Date: Mon Jun 23 02:38:56 2008
New Revision: 1633
URL: http://svn.gnome.org/viewvc/vala?rev=1633&view=rev
Log:
2008-06-23 Jamie McCracken <jamiemcc gnome org>
* vala/valageniescanner.vala:
Allow arbitrary whitespace/tabs at start of line when its a line continuation
Modified:
trunk/ChangeLog
trunk/vala/valageniescanner.vala
Modified: trunk/vala/valageniescanner.vala
==============================================================================
--- trunk/vala/valageniescanner.vala (original)
+++ trunk/vala/valageniescanner.vala Mon Jun 23 02:38:56 2008
@@ -453,9 +453,11 @@
space ();
}
- /* handle line continuation */
+ /* handle line continuation (lines ending with \) */
while (current < end && current[0] == '\\' && current[1] == '\n') {
current += 2;
+ line++;
+ skip_space_tabs ();
}
/* handle non-consecutive new line once parsing is underway - EOL */
@@ -1016,11 +1018,31 @@
return true;
}
+ bool skip_tabs () {
+ bool found = false;
+ while (current < end && current[0] == '\t' ) {
+ current++;
+ column++;
+ found = true;
+ }
+
+ return found;
+ }
+
+ void skip_space_tabs () {
+ while (whitespace () || skip_tabs () || comment () ) {
+ }
+
+ }
+
void space () {
while (whitespace () || comment ()) {
}
}
+
+
+
void push_comment (string comment_item, bool file_comment) {
if (_comment == null) {
_comment = comment_item;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]