Class: Rouge::Lexers::Swift
- Inherits:
-
RegexLexer
- Object
- Rouge::Lexer
- RegexLexer
- Rouge::Lexers::Swift
- Defined in:
- lib/rouge/lexers/swift.rb
Constant Summary
Constants inherited from RegexLexer
Constants included from Token::Tokens
Token::Tokens::Num, Token::Tokens::Str
Class Method Summary collapse
Methods inherited from RegexLexer
append, #delegate, get_state, #get_state, #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, analyze_text, assert_utf8!, #debug, default_options, demo, demo_file, desc, filenames, find, find_fancy, guess, guess_by_filename, guess_by_mimetype, guess_by_source, guesses, #initialize, lex, #lex, mimetypes, #option, #options, #reset!, #stream_tokens, tag, #tag
Methods included from Token::Tokens
Constructor Details
This class inherits a constructor from Rouge::Lexer
Class Method Details
.constants ⇒ Object
40 41 42 43 44 |
# File 'lib/rouge/lexers/swift.rb', line 40 def self.constants @constants ||= Set.new %w( true false nil ) end |
.declarations ⇒ Object
25 26 27 28 29 |
# File 'lib/rouge/lexers/swift.rb', line 25 def self.declarations @declarations ||= Set.new %w( class deinit enum extension func import init let protocol static struct subscript typealias var ) end |
.keywords ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/rouge/lexers/swift.rb', line 15 def self.keywords @keywords ||= Set.new %w( break case continue default do else fallthrough if in for return switch where while as dynamicType is new super self Self Type __COLUMN__ __FILE__ __FUNCTION__ __LINE__ associativity didSet get infix inout left mutating none nonmutating operator override postfix precedence prefix right set unowned unowned(safe) unowned(unsafe) weak willSet ) end |
.types ⇒ Object
31 32 33 34 35 36 37 38 |
# File 'lib/rouge/lexers/swift.rb', line 31 def self.types @types ||= Set.new %w( Int8 Int16 Int32 Int64 UInt8 UInt16 UInt32 UInt64 Int Double Float Bool String Character ) end |