ex_yarn v0.4.1 ExYarn.Token View Source
A token is the building block of a lockfile (intended for internal use only)
This module takes a lockfile's contents as input and breaks it up into a list of tokens, each of them representing a single discrete element of the lockfile.
Tokens represent every piece that makes up a lockfile, from comments, strings and integers to line returns, colons and indentation.
Link to this section Summary
Link to this section Types
Specs
The representation of a token
Specs
tokenType() :: :boolean | :string | :identifier | :eof | :colon | :new_line | :comment | :indent | :invalid | :number | :comma
The list of types a token can have
Link to this section Functions
Specs
Main entrypoint for the module. Takes as input a String
representing the
contents of a yarn lockfile and returns the corresponding list of tokens.
Specs
Takes a ExYarn.Parser.Token
as an input and returns a boolean indicating
whether or not it can be used as a value for a key