Package ch.usi.si.seart.treesitter
Class Parser.Builder
- java.lang.Object
-
- ch.usi.si.seart.treesitter.Parser.Builder
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Parserbuild()Builds and returns a new Parser instance with the configured language.Parser.Builderlanguage(@NotNull Language language)Sets the programming language intended for parsing.
-
-
-
Method Detail
-
language
public Parser.Builder language(@NotNull @NotNull Language language)
Sets the programming language intended for parsing.- Parameters:
language- The language used for parsing- Returns:
- this builder
- Throws:
NullPointerException- if the language is nullUnsatisfiedLinkError- if the language was not linked to native codeABIVersionError- if the language ABI version is incompatible with requirements
-
build
public Parser build()
Builds and returns a new Parser instance with the configured language.- Returns:
- A new parser instance
- Throws:
NullPointerException- if the language was not previously setIncompatibleLanguageException- if the language can not be set
-
-