Class: Rouge::Lexers::Scheme

Inherits:
RegexLexer show all
Defined in:
lib/rouge/lexers/scheme.rb

Constant Summary

Constants inherited from RegexLexer

RegexLexer::MAX_NULL_SCANS

Constants included from Token::Tokens

Token::Tokens::Num, Token::Tokens::Str

Instance Attribute Summary

Attributes inherited from Rouge::Lexer

#options

Class Method Summary collapse

Methods inherited from RegexLexer

append, #delegate, #goto, #group, #groups, #in_state?, #pop!, prepend, #push, #recurse, replace_state, #reset!, #reset_stack, #stack, start, start_procs, state, #state, #state?, state_definitions, states, #step, #stream_tokens, #token

Methods inherited from Rouge::Lexer

aliases, all, #as_bool, #as_lexer, #as_list, #as_string, #as_token, #bool_option, continue_lex, #continue_lex, debug_enabled?, demo, demo_file, desc, detect?, detectable?, disable_debug!, enable_debug!, filenames, find, find_fancy, guess, guess_by_filename, guess_by_mimetype, guess_by_source, guesses, #hash_option, #initialize, lex, #lex, #lexer_option, #list_option, lookup_fancy, mimetypes, option, option_docs, #reset!, #stream_tokens, #string_option, tag, #tag, title, #token_option, #with

Methods included from Token::Tokens

token

Constructor Details

This class inherits a constructor from Rouge::Lexer

Class Method Details

.builtinsObject



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/rouge/lexers/scheme.rb', line 22

def self.builtins
  @builtins ||= Set.new %w(
    * + - / < <= = > >= abs acos angle append apply asin
    assoc assq assv atan boolean? caaaar caaadr caaar caadar
    caaddr caadr caar cadaar cadadr cadar caddar cadddr caddr
    cadr call-with-current-continuation call-with-input-file
    call-with-output-file call-with-values call/cc car cdaaar cdaadr
    cdaar cdadar cdaddr cdadr cdar cddaar cddadr cddar cdddar cddddr
    cdddr cddr cdr ceiling char->integer char-alphabetic? char-ci<=?
    char-ci<? char-ci=? char-ci>=? char-ci>? char-downcase
    char-lower-case? char-numeric? char-ready? char-upcase
    char-upper-case? char-whitespace? char<=? char<? char=? char>=?
    char>? char? close-input-port close-output-port complex? cons
    cos current-input-port current-output-port denominator
    display dynamic-wind eof-object? eq?  equal? eqv? eval
    even? exact->inexact exact? exp expt floor for-each force gcd
    imag-part inexact->exact inexact? input-port? integer->char
    integer? interaction-environment lcm length list list->string
    list->vector list-ref list-tail list?  load log magnitude
    make-polar make-rectangular make-string make-vector map
    max member memq memv min modulo negative? newline not
    null-environment null? number->string number? numerator odd?
    open-input-file open-output-file output-port? pair?  peek-char
    port? positive? procedure? quotient rational? rationalize
    read read-char real-part real?  remainder reverse round
    scheme-report-environment set-car! set-cdr! sin sqrt string
    string->list string->number string->symbol string-append
    string-ci<=?  string-ci<? string-ci=? string-ci>=? string-ci>?
    string-copy string-fill! string-length string-ref
    string-set! string<=? string<? string=? string>=?
    string>? string? substring symbol->string symbol?
    tan transcript-off transcript-on truncate values vector
    vector->list vector-fill! vector-length vector-ref
    vector-set! vector? with-input-from-file with-output-to-file
    write write-char zero?
  )
end

.keywordsObject



14
15
16
17
18
19
20
# File 'lib/rouge/lexers/scheme.rb', line 14

def self.keywords
  @keywords ||= Set.new %w(
    lambda define if else cond and or case let let* letrec begin
    do delay set! => quote quasiquote unquote unquote-splicing
    define-syntax let-syntax letrec-syntax syntax-rules
  )
end