- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
[Record] variant ItemPatternMatched: PatternMatchedBase, IPatternMatched
_matchByLexemeValue:option[string]
public Match(source:SourceLexemes, namedLinkDictionary:NamedLinkDictionary):MatchResult
match(source)
|[] => MatchResult.EndOfLexemes(source, namedLinkDictionary)
|lexeme_::lexemes_=> def updatedNamedLinkDictionary = updateNamedLinkDictionary(lexeme_::[], namedLinkDictionary);
def failure = MatchResult.Failure(source, namedLinkDictionary);
def success = MatchResult.Success(lexemes_, updatedNamedLinkDictionary);
match(_matchByLexemeValue)
|None | Some(lexemeValue_) when (lexemeValue_==lexeme_._value) =>
match(this, lexeme_._type)
|(Symbol, SourceLexeme.Type.Symbol) | (Identificator, SourceLexeme.Type.Identificator) | (Number, SourceLexeme.Type.Number) =>
success
|_ =>
failure
|_ =>
failure
|Symbol
|Identificator
|Number