Sha256: bdc2a78c928b0363fb71e9bd9f384c606aa2a3d3809f7c7c1f083e790b29a876
Contents?: true
Size: 566 Bytes
Versions: 20
Compression:
Stored size: 566 Bytes
Contents
Your new syntax implementation should extend @Syntax::Tokenizer@--this sets up a rich domain-specific language for scanning and tokenizing. Then, all you need to implement is the @#step@ method, which should take no parameters. Each invocation of @#step@ should extract at least one token, but may extract as many as you need it to. (Fewer is generally better, though.) Additionally, you may also implement @#setup@, to perform any initialization that should occur when tokenizing begins. Similarly, @#teardown@ may be implemented to do any cleanup that is needed.
Version data entries
20 entries across 20 versions & 1 rubygems