= Sass::Script::Lexer < Object
| Use Case | Command | Description |
|---|---|---|
| Create a new lexer | Sass::Script::Lexer.new(string) | Instantiate a lexer for a SassScript string |
| Get next token | lexer.next | Return the next token from the input |
| Peek at next token | lexer.peek | Look at the next token without consuming it |
| Check whitespace | lexer.whitespace? | Determine if the current character is whitespace |
| Get current line | lexer.line | Return the current line number |
Sass::SCSS::RX (from /home/chedong/.local/share/rdoc)
The lexical analyzer for SassScript. It takes a raw string and converts it to individual tokens that are easier to parse.
IDENT_OP_NAMES: A sub-list of {OP_NAMES} that only includes operators with identifier names.OPERATORS: A hash from operator strings to the corresponding token types.OPERATORS_REVERSE: [not documented]OP_NAMES: A list of operator strings ordered with longer names first so that > and < don't clobber >= and <=.PARSEABLE_NUMBER: [not documented]REGULAR_EXPRESSIONS: A hash of regular expressions that are used for tokenizing.STRING_REGULAR_EXPRESSIONS: A hash of regular expressions that are used for tokenizing strings. The key is a [Symbol, Boolean] pair. The symbol represents which style of quotation to use, while the boolean represents whether or not the string is following an interpolated segment.TOKEN_NAMES: [not documented]Token: A struct containing information about an individual token.
type: [Symbol] The type of token.value: [Object] The Ruby object corresponding to the value of the token.source_range: [Sass::Source::Range] The range in the source file in which the token appeared.pos: [Integer] The scanner position at which the SassScript token appeared.newafter_interpolation?chardone?expected!linenextnext_charoffsetpeekstrtryunpeek!whitespace?Generated by phpman v4.9.26-1-g511901d · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-29 22:44 @216.73.216.177
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format