Skip to content

Commit

Permalink
Merge pull request #492 from systay/semicolons
Browse files Browse the repository at this point in the history
Made sure that all queries can end with a semicolon
  • Loading branch information
jexp committed May 4, 2012
2 parents bbb08c0 + 9f1d233 commit 1088df1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ Thank you, the Neo4j Team.""")
}
}

def noBody: Parser[Body] = "$".r ^^ (x => NoBody())
def noBody: Parser[Body] = opt(";") ~> "$".r ^^ (x => NoBody())

def checkForAggregates(where: Option[Predicate]) {
where match {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,6 @@ class CypherParserTest extends JUnitSuite with Assertions {
returns(ReturnItem(Entity("s"), "s")))
}

@Test def end_with_semicolon_is_not_a_problem() {
testFrom_1_8("start s = NODE(1) return s;",
Query.
start(NodeById("s", 1)).
returns(ReturnItem(Entity("s"), "s")))
}

@Test def allTheNodes() {
testFrom_1_7("start s = NODE(*) return s",
Query.
Expand Down Expand Up @@ -1673,6 +1666,7 @@ create a-[r:REL]->b

def test_1_8(query: String, expectedQuery: Query) {
testQuery(None, query, expectedQuery)
testQuery(None, query + ";", expectedQuery)
}

def test_1_6(query: String, expectedQuery: Query) {
Expand Down

0 comments on commit 1088df1

Please sign in to comment.