Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Start of pretty parser

  • Loading branch information...
commit a8f5a58b70e473498f3ecee2987028b24c27000b 1 parent e412a1e
Andres Taylor authored
12 cypher/src/main/scala/org/neo4j/cypher/internal/parser/v1_8/PrettyPrintParser.scala
View
@@ -0,0 +1,12 @@
+package org.neo4j.cypher.internal.parser.v1_8
+
+import util.parsing.combinator.RegexParsers
+
+
+/*
+2012-06-29 Andres Taylor: This should really be done using the normal parser and the query objects. This is a temporary workaround
+until we can re-structure the existing parser to do this.
+*/
+class PrettyPrintParser extends RegexParsers {
+ def parse(text: String): String = text
+}
13 cypher/src/test/scala/org/neo4j/cypher/internal/parser/v1_8/PrettyPrintParserTest.scala
View
@@ -0,0 +1,13 @@
+package org.neo4j.cypher.internal.parser.v1_8
+
+import org.junit.Test
+import org.scalatest.Assertions
+
+
+class PrettyPrintParserTest extends Assertions {
+ val parser = new PrettyPrintParser
+
+ @Test def simpleStart() {
+ assert(parser.parse("start n=node(1) return n") === "START n=node(1)\nRETURN n")
+ }
+}
Please sign in to comment.
Something went wrong with that request. Please try again.