Variable: js--class-styles
js--class-styles is a variable defined in js.el.gz.
Value
Large value
((:name "Plain" :class-decl
"^\\s-*\\([[:alpha:]_$]\\(?:\\s_\\|\\sw\\)*\\(?:\\.[[:alpha:]_$]\\(?:\\s_\\|\\sw\\)*\\)*\\)\\.prototype\\s-*=\\s-*{"
:prototype t :contexts (toplevel) :framework javascript)
(:name "MochiKit" :class-decl
"^\\s-*MochiKit\\.Base\\.update\\s-*(\\s-*\\([[:alpha:]_$]\\(?:\\s_\\|\\sw\\)*\\(?:\\.[[:alpha:]_$]\\(?:\\s_\\|\\sw\\)*\\)*\\)"
:prototype t :contexts (toplevel) :framework mochikit)
(:name "Prototype (Obsolete)" :class-decl
"^\\s-*\\(?:var\\s-+\\)?\\([[:alpha:]_$]\\(?:\\s_\\|\\sw\\)*\\(?:\\.[[:alpha:]_$]\\(?:\\s_\\|\\sw\\)*\\)*\\)\\s-*=\\s-*Class\\.create()"
:contexts (toplevel) :framework prototype)
(:name "Prototype (Modern)" :class-decl
"^\\s-*\\(?:var\\s-+\\)?\\([[:alpha:]_$]\\(?:\\s_\\|\\sw\\)*\\)\\s-*=\\s-*Class\\.create\\s-*(\\s-*\\(?:\\([[:alpha:]_$]\\(?:\\s_\\|\\sw\\)*\\(?:\\.[[:alpha:]_$]\\(?:\\s_\\|\\sw\\)*\\)*\\)\\s-*,\\s-*\\)?{?"
:contexts (toplevel) :framework prototype)
(:name "Prototype (Object.extend)" :class-decl
"^\\s-*Object\\.extend\\s-*(\\([[:alpha:]_$]\\(?:\\s_\\|\\sw\\)*\\(?:\\.[[:alpha:]_$]\\(?:\\s_\\|\\sw\\)*\\)*\\)\\s-*,\\s-*{"
:prototype t :contexts (toplevel) :framework prototype)
(:name "Prototype (Object.extend) 2" :class-decl
"^\\s-*\\(?:var\\s-+\\)?\\([[:alpha:]_$]\\(?:\\s_\\|\\sw\\)*\\(?:\\.[[:alpha:]_$]\\(?:\\s_\\|\\sw\\)*\\)*\\)\\s-*=\\s-*Object\\.extend\\s-*("
:prototype t :contexts (toplevel) :framework prototype)
(:name "Dojo" :class-decl
"^\\s-*dojo\\.declare\\s-*(\"\\([[:alpha:]_$]\\(?:\\s_\\|\\sw\\)*\\(?:\\.[[:alpha:]_$]\\(?:\\s_\\|\\sw\\)*\\)*\\)"
:contexts (toplevel) :framework dojo)
(:name "ExtJS (style 1)" :class-decl
"^\\s-*Ext\\.extend\\s-*(\\s-*\\([[:alpha:]_$]\\(?:\\s_\\|\\sw\\)*\\(?:\\.[[:alpha:]_$]\\(?:\\s_\\|\\sw\\)*\\)*\\)\\s-*,\\s-*\\([[:alpha:]_$]\\(?:\\s_\\|\\sw\\)*\\(?:\\.[[:alpha:]_$]\\(?:\\s_\\|\\sw\\)*\\)*\\)"
:prototype t :contexts (toplevel) :framework extjs)
(:name "ExtJS (style 2)" :class-decl
"^\\s-*\\(?:var\\s-+\\)?\\([[:alpha:]_$]\\(?:\\s_\\|\\sw\\)*\\)\\s-*=\\s-*Ext\\.extend\\s-*(\\s-*\\([[:alpha:]_$]\\(?:\\s_\\|\\sw\\)*\\(?:\\.[[:alpha:]_$]\\(?:\\s_\\|\\sw\\)*\\)*\\)"
:contexts (toplevel) :framework extjs)
(:name "Merrill Press" :class-decl
"^\\s-*var\\s-+\\([[:alpha:]_$]\\(?:\\s_\\|\\sw\\)*\\)\\s-*=\\s-*\\([[:alpha:]_$]\\(?:\\s_\\|\\sw\\)*\\(?:\\.[[:alpha:]_$]\\(?:\\s_\\|\\sw\\)*\\)*\\)\\.extend\\(?:Final\\)?\\s-*(\\s-*{?\\s-*$"
:contexts (toplevel) :framework merrillpress))
Documentation
List of JavaScript class definition styles.
A class definition style is a plist with the following keys:
:name is a human-readable name of the class type
:class-decl is a regular expression giving the start of the
class. Its first group must match the name of its class. If there
is a parent class, the second group should match, and it should be
the name of the class.
If :prototype is present and non-nil, the parser will merge declarations for this constructs with others at the same lexical level that have the same name. Otherwise, multiple definitions will create multiple top-level entries. Don't use :prototype unnecessarily: it has an associated cost in performance.
If :strip-prototype is present and non-nil, then if the class name as matched contains.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/js.el.gz
(defconst js--class-styles
`((:name "Plain"
:class-decl ,js--plain-class-re
:prototype t
:contexts (toplevel)
:framework javascript)
(:name "MochiKit"
:class-decl ,js--mochikit-class-re
:prototype t
:contexts (toplevel)
:framework mochikit)
(:name "Prototype (Obsolete)"
:class-decl ,js--prototype-obsolete-class-decl-re
:contexts (toplevel)
:framework prototype)
(:name "Prototype (Modern)"
:class-decl ,js--prototype-class-decl-re
:contexts (toplevel)
:framework prototype)
(:name "Prototype (Object.extend)"
:class-decl ,js--prototype-objextend-class-decl-re-1
:prototype t
:contexts (toplevel)
:framework prototype)
(:name "Prototype (Object.extend) 2"
:class-decl ,js--prototype-objextend-class-decl-re-2
:prototype t
:contexts (toplevel)
:framework prototype)
(:name "Dojo"
:class-decl ,js--dojo-class-decl-re
:contexts (toplevel)
:framework dojo)
(:name "ExtJS (style 1)"
:class-decl ,js--extjs-class-decl-re-1
:prototype t
:contexts (toplevel)
:framework extjs)
(:name "ExtJS (style 2)"
:class-decl ,js--extjs-class-decl-re-2
:contexts (toplevel)
:framework extjs)
(:name "Merrill Press"
:class-decl ,js--mp-class-decl-re
:contexts (toplevel)
:framework merrillpress))
"List of JavaScript class definition styles.
A class definition style is a plist with the following keys:
:name is a human-readable name of the class type
:class-decl is a regular expression giving the start of the
class. Its first group must match the name of its class. If there
is a parent class, the second group should match, and it should be
the name of the class.
If :prototype is present and non-nil, the parser will merge
declarations for this constructs with others at the same lexical
level that have the same name. Otherwise, multiple definitions
will create multiple top-level entries. Don't use :prototype
unnecessarily: it has an associated cost in performance.
If :strip-prototype is present and non-nil, then if the class
name as matched contains.")