-
Notifications
You must be signed in to change notification settings - Fork 15
/
NameDesc.scala
29 lines (26 loc) · 1.15 KB
/
NameDesc.scala
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
/* SPDX-FileCopyrightText: © 2022 Parsley Contributors <https://github.com/j-mie6/Parsley/graphs/contributors>
* SPDX-License-Identifier: BSD-3-Clause
*/
package parsley.token.descriptions
import parsley.token.predicate.{CharPredicate, NotRequired}
/** The class describes how name-like things are described lexically.
*
* @param identifierStart what characters may start an identifier?
* @param identifierLetter what characters may continue an identifier?
* @param operatorStart what characters may start a user-defined operator?
* @param operatorLetter what characters may continue a user-defined operator?
* @since 4.0.0
*/
final case class NameDesc (identifierStart: CharPredicate,
identifierLetter: CharPredicate,
operatorStart: CharPredicate,
operatorLetter: CharPredicate)
/** This object contains any preconfigured name definitions.
* @since 4.0.0
*/
object NameDesc {
/** Plain description of names, where neither identifiers nor operators are required.
* @since 4.0.0
*/
val plain = NameDesc(NotRequired, NotRequired, NotRequired, NotRequired)
}