class Gettext::PluralForm::Scanner

Overview

A scanner to tokenize a subset of C's grammar

Based on https://www.craftinginterpreters.com/scanning.html

Defined in:

backend/gettext/plural-forms/lexer.cr

Constructors

Instance methods inherited from class Lens::Base::Lexer(Gettext::PluralForm::Token)

next next, scan scan

Constructor methods inherited from class Lens::Base::Lexer(Gettext::PluralForm::Token)

new(source : String) new

Constructor Detail

def self.new(source : String) #

Creates a new scanner instance with the given source

plural_form_scanner = Gettext::PluralForm::Scanner.new("nplurals=2; plural=(n > 1);")

[View source]