blob: 4dc1a2685962b8c64e681a33f2ff22a72f2b442d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
/* __ *\
** ________ ___ / / ___ Scala API **
** / __/ __// _ | / / / _ | (c) 2006-2010, LAMP/EPFL **
** __\ \/ /__/ __ |/ /__/ __ | **
** /____/\___/_/ |_/____/_/ | | **
** |/ **
\* */
package scala.util.parsing.ast
import scala.util.parsing.input.Positional
/** This component provides the core abstractions for representing an Abstract Syntax Tree
*
* @author Adriaan Moors
*/
trait AbstractSyntax {
/** The base class for elements of the abstract syntax tree.
*/
trait Element extends Positional
/** The base class for elements in the AST that represent names {@see Binders}.
*/
trait NameElement extends Element {
def name: String
override def equals(that: Any): Boolean = that match {
case n: NameElement => n.name == name
case _ => false
}
}
}
|