[tracker] SPARQL: Fix WITH support



commit fa496c997a2bb1c5701d2e2ea421235457ebca8a
Author: Jürg Billeter <j bitron ch>
Date:   Wed Dec 22 13:54:58 2010 +0100

    SPARQL: Fix WITH support

 src/libtracker-data/tracker-sparql-scanner.vala |   15 +++++----------
 1 files changed, 5 insertions(+), 10 deletions(-)
---
diff --git a/src/libtracker-data/tracker-sparql-scanner.vala b/src/libtracker-data/tracker-sparql-scanner.vala
index cff636f..5a188db 100644
--- a/src/libtracker-data/tracker-sparql-scanner.vala
+++ b/src/libtracker-data/tracker-sparql-scanner.vala
@@ -160,6 +160,10 @@ public class Tracker.SparqlScanner : Object {
 			case 't':
 				if (matches (begin, "TRUE")) return SparqlTokenType.TRUE;
 				break;
+			case 'W':
+			case 'w':
+				if (matches (begin, "WITH")) return SparqlTokenType.WITH;
+				break;
 			}
 			break;
 		case 5:
@@ -207,16 +211,7 @@ public class Tracker.SparqlScanner : Object {
 				break;
 			case 'W':
 			case 'w':
-				switch (begin[1]) {
-				case 'H':
-				case 'h':
-					if (matches (begin, "WHERE")) return SparqlTokenType.WHERE;
-					break;
-				case 'I':
-				case 'i':
-					if (matches (begin, "WITH")) return SparqlTokenType.WITH;
-					break;
-				}
+				if (matches (begin, "WHERE")) return SparqlTokenType.WHERE;
 				break;
 			case 'F':
 			case 'f':



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]