positional.scala
来自「JAVA 语言的函数式编程扩展」· SCALA 代码 · 共 30 行
SCALA
30 行
/* __ *\** ________ ___ / / ___ Scala API **** / __/ __// _ | / / / _ | (c) 2006-2007, LAMP/EPFL **** __\ \/ /__/ __ |/ /__/ __ | **** /____/\___/_/ |_/____/_/ | | **** |/ **\* */package scala.util.parsing.input/** A trait for objects that have a source position. * * @author Martin Odersky, Adriaan Moors */trait Positional { /** The source position of this object, initially set to undefined. */ var pos: Position = NoPosition /** If current source position is undefined, update it with given position `newpos' * @return the object itself */ def setPos(newpos: Position): this.type = { if (pos eq NoPosition) pos = newpos this }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?