object Collector
Attempt to collect all the fields in a class or object that contain a parser of type parsley.Parsley, or from a parsley.token.Lexer.
This information is used later in the debug tree-building process to rename certain parsers so that they do not end up being named things like "packageanon".
You only need to run this once per parser-holding object.
- Source
- Collector.scala
- Since
4.5.0
- Alphabetic
- By Inheritance
- Collector
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
assignName(par: Parsley[_], name: String): Unit
Manually add a name for a parser by reference.
Manually add a name for a parser by reference.
Can also be used if a more informative name for a parser is wanted. In this case, use this method after using names or lexer to override the automatically collected / found name.
- Note
Names assigned using this will take precedence over names assigned using parsley.debugger.combinator.named.
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isSupported: Boolean
Does the implementation of the collector for the current Scala platform actually work in automatically finding parsers in objects and getting their field names as written in your parser code?
Does the implementation of the collector for the current Scala platform actually work in automatically finding parsers in objects and getting their field names as written in your parser code?
- Annotations
- @inline()
- Note
Manually named parsers using assignName or parsley.debugger.combinator.named will still work regardless if the platform is supported or not.
-
def
lexer(lexer: Lexer): Unit
Collect names of parsers from a parsley.token.Lexer.
Collect names of parsers from a parsley.token.Lexer.
- Note
For Scala 3 on the JVM, this may trigger a warning about
setAccessible
for private members being deprecated.- See also
names for more information regarding the warning.
-
def
names(obj: Any): Unit
Collect names of parsers from an object.
Collect names of parsers from an object.
- Note
For Scala 3 on the JVM, it is advised that all parsers in objects being introspected are marked
public
, as otherwise, a semi-deprecated call tosetAccessible
will be called on a private object, which may be restricted or removed in a future version of the JVM. It may be advised to manually name one's parsers (to be debugged) using assignName or parsley.debugger.combinator.named if that warning is not desirable.
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()