diff options
author | Li Haoyi <haoyi@dropbox.com> | 2014-11-16 18:53:21 -0800 |
---|---|---|
committer | Li Haoyi <haoyi@dropbox.com> | 2014-11-16 18:53:21 -0800 |
commit | 001bc7ed3dd1f92be14802406897e7304ac1f2de (patch) | |
tree | 092785256d15d1fb28617ef5f257630f9e6e0126 /scalatexApi/src/main/scala/scalatex/stages/Parser.scala | |
parent | 85cf9e1849b452da681d11ead314f46ba8be9512 (diff) | |
download | hands-on-scala-js-001bc7ed3dd1f92be14802406897e7304ac1f2de.tar.gz hands-on-scala-js-001bc7ed3dd1f92be14802406897e7304ac1f2de.tar.bz2 hands-on-scala-js-001bc7ed3dd1f92be14802406897e7304ac1f2de.zip |
Bunch of moving things into namespaces, `Basic`, `Identifiers` and `Literals` don't have their guts spilling everywhere
Diffstat (limited to 'scalatexApi/src/main/scala/scalatex/stages/Parser.scala')
-rw-r--r-- | scalatexApi/src/main/scala/scalatex/stages/Parser.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scalatexApi/src/main/scala/scalatex/stages/Parser.scala b/scalatexApi/src/main/scala/scalatex/stages/Parser.scala index 5db0a8e..117806d 100644 --- a/scalatexApi/src/main/scala/scalatex/stages/Parser.scala +++ b/scalatexApi/src/main/scala/scalatex/stages/Parser.scala @@ -38,7 +38,7 @@ class Parser(input: ParserInput, indent: Int = 0, offset: Int = 0) extends Scala } def Text = TextNot("@") def Code = rule { - "@" ~ capture(Id | BlockExpr2 | ('(' ~ optional(Exprs) ~ ')')) + "@" ~ capture(Identifiers.Id | BlockExpr2 | ('(' ~ optional(Exprs) ~ ')')) } def Header = rule { "@" ~ capture(Def(false) | Import(false)) @@ -94,7 +94,7 @@ class Parser(input: ParserInput, indent: Int = 0, offset: Int = 0) extends Scala push(offsetCursor) ~ Code ~ zeroOrMore(Extension) ~> { (a, b, c) => Ast.Chain(b, c, a)} } def Extension: Rule1[Ast.Chain.Sub] = rule { - (push(offsetCursor) ~ '.' ~ capture(Id) ~> ((x, y) => Ast.Chain.Prop(y, x))) | + (push(offsetCursor) ~ '.' ~ capture(Identifiers.Id) ~> ((x, y) => Ast.Chain.Prop(y, x))) | (push(offsetCursor) ~ capture(TypeArgs2) ~> ((x, y) => Ast.Chain.TypeArgs(y, x))) | (push(offsetCursor) ~ capture(ArgumentExprs2) ~> ((x, y) => Ast.Chain.Args(y, x))) | BraceBlock |