diff options
Diffstat (limited to 'src/compiler/scala/tools/nsc/ast/parser')
-rw-r--r-- | src/compiler/scala/tools/nsc/ast/parser/BracePatch.scala | 1 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/ast/parser/Change.scala | 10 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/ast/parser/Patch.scala | 8 |
3 files changed, 19 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/parser/BracePatch.scala b/src/compiler/scala/tools/nsc/ast/parser/BracePatch.scala index 0ef4374a9b..803f35d9cd 100644 --- a/src/compiler/scala/tools/nsc/ast/parser/BracePatch.scala +++ b/src/compiler/scala/tools/nsc/ast/parser/BracePatch.scala @@ -10,3 +10,4 @@ package ast.parser * @param inserted If true, brace needs to be inserted, otherwise brace needs to be deleted. */ case class BracePatch(off: Int, inserted: Boolean) +extends Patch(off, if (inserted) Insertion("{") else Deletion(1))
\ No newline at end of file diff --git a/src/compiler/scala/tools/nsc/ast/parser/Change.scala b/src/compiler/scala/tools/nsc/ast/parser/Change.scala new file mode 100644 index 0000000000..12f189ac6b --- /dev/null +++ b/src/compiler/scala/tools/nsc/ast/parser/Change.scala @@ -0,0 +1,10 @@ +/* NSC -- new Scala compiler + * Copyright 2005-2010 LAMP/EPFL + * @author Martin Odersky + */ +package scala.tools.nsc.ast.parser + +abstract class Change +case class Insertion(text: String) extends Change +case class Deletion(nchars: Int) extends Change + diff --git a/src/compiler/scala/tools/nsc/ast/parser/Patch.scala b/src/compiler/scala/tools/nsc/ast/parser/Patch.scala new file mode 100644 index 0000000000..a55f84151c --- /dev/null +++ b/src/compiler/scala/tools/nsc/ast/parser/Patch.scala @@ -0,0 +1,8 @@ +/* NSC -- new Scala compiler + * Copyright 2005-2010 LAMP/EPFL + * @author Martin Odersky + */ +package scala.tools.nsc.ast.parser + +class Patch(off: Int, change: Change) + |