Class: CodeRay::Scanners::Delphi

Inherits:
Scanner
  • Object
show all
Defined in:
lib/coderay/scanners/delphi.rb

Overview

Scanner for the Delphi language (Object Pascal).

Alias: pascal

Constant Summary collapse

KEYWORDS =
[
  'and', 'array', 'as', 'at', 'asm', 'at', 'begin', 'case', 'class',
  'const', 'constructor', 'destructor', 'dispinterface', 'div', 'do',
  'downto', 'else', 'end', 'except', 'exports', 'file', 'finalization',
  'finally', 'for', 'function', 'goto', 'if', 'implementation', 'in',
  'inherited', 'initialization', 'inline', 'interface', 'is', 'label',
  'library', 'mod', 'nil', 'not', 'object', 'of', 'or', 'out', 'packed',
  'procedure', 'program', 'property', 'raise', 'record', 'repeat',
  'resourcestring', 'set', 'shl', 'shr', 'string', 'then', 'threadvar',
  'to', 'try', 'type', 'unit', 'until', 'uses', 'var', 'while', 'with',
  'xor', 'on',
]
DIRECTIVES =

:nodoc:

[
  'absolute', 'abstract', 'assembler', 'at', 'automated', 'cdecl',
  'contains', 'deprecated', 'dispid', 'dynamic', 'export',
  'external', 'far', 'forward', 'implements', 'local', 
  'near', 'nodefault', 'on', 'overload', 'override',
  'package', 'pascal', 'platform', 'private', 'protected', 'public',
  'published', 'read', 'readonly', 'register', 'reintroduce',
  'requires', 'resident', 'safecall', 'stdcall', 'stored', 'varargs',
  'virtual', 'write', 'writeonly',
]
IDENT_KIND =

:nodoc:

WordList::CaseIgnoring.new(:ident).
add(KEYWORDS, :keyword).
add(DIRECTIVES, :directive)
NAME_FOLLOWS =
WordList::CaseIgnoring.new(false).
add(%w(procedure function .))

Constants inherited from Scanner

Scanner::DEFAULT_OPTIONS, Scanner::KINDS_NOT_LOC, Scanner::ScanError

Instance Attribute Summary

Attributes inherited from Scanner

#state

Attributes included from Plugin

#plugin_id

Method Summary

Methods inherited from Scanner

#binary_string, #column, #each, encoding, file_extension, #file_extension, #initialize, #lang, lang, #line, normalize, #reset, #string=, #tokenize, #tokens

Methods included from Plugin

#aliases, #plugin_host, #register_for, #title

Constructor Details

This class inherits a constructor from CodeRay::Scanners::Scanner