diff options
author | Martin Odersky <odersky@gmail.com> | 2009-12-10 17:00:59 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2009-12-10 17:00:59 +0000 |
commit | 1ba4b3586601612c0debb63fa40306d868e9fcad (patch) | |
tree | d67a8a1d4bb7ebda1a2574e643195d7853667f25 /src/compiler/scala/tools/nsc/ast/parser/Scanners.scala | |
parent | 670bbca782b7232842e0036a4be79626660b1802 (diff) | |
download | scala-1ba4b3586601612c0debb63fa40306d868e9fcad.tar.gz scala-1ba4b3586601612c0debb63fa40306d868e9fcad.tar.bz2 scala-1ba4b3586601612c0debb63fa40306d868e9fcad.zip |
refined doc comments generation; refactored cod...
refined doc comments generation; refactored code into new Chars,
DocStrings classes in util. Added some more doc comments to collection
classes.
Diffstat (limited to 'src/compiler/scala/tools/nsc/ast/parser/Scanners.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/ast/parser/Scanners.scala | 29 |
1 files changed, 2 insertions, 27 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/parser/Scanners.scala b/src/compiler/scala/tools/nsc/ast/parser/Scanners.scala index 3de13ed877..a9a3ded6b4 100644 --- a/src/compiler/scala/tools/nsc/ast/parser/Scanners.scala +++ b/src/compiler/scala/tools/nsc/ast/parser/Scanners.scala @@ -7,11 +7,12 @@ package scala.tools.nsc package ast.parser import scala.tools.nsc.util._ -import SourceFile.{LF, FF, CR, SU} +import Chars.{LF, FF, CR, SU} import Tokens._ import scala.annotation.switch import scala.collection.mutable.{ListBuffer, ArrayBuffer} import scala.xml.Utility.{ isNameStart } +import util.Chars._ trait Scanners { val global : Global @@ -883,32 +884,6 @@ trait Scanners { } } // end Scanner - // ------------- character classification -------------------------------- - - def isIdentifierStart(c: Char): Boolean = - ('A' <= c && c <= 'Z') || - ('a' <= c && c <= 'a') || - (c == '_') || (c == '$') || - Character.isUnicodeIdentifierStart(c) - - def isIdentifierPart(c: Char) = - isIdentifierStart(c) || - ('0' <= c && c <= '9') || - Character.isUnicodeIdentifierPart(c) - - def isSpecial(c: Char) = { - val chtp = Character.getType(c) - chtp == Character.MATH_SYMBOL.toInt || chtp == Character.OTHER_SYMBOL.toInt - } - - def isOperatorPart(c : Char) : Boolean = (c: @switch) match { - case '~' | '!' | '@' | '#' | '%' | - '^' | '*' | '+' | '-' | '<' | - '>' | '?' | ':' | '=' | '&' | - '|' | '/' | '\\' => true - case c => isSpecial(c) - } - // ------------- keyword configuration ----------------------------------- /** Keyword array; maps from name indices to tokens */ |