3 * Description: JavaScript language.
4 * Author: Markku Rossi <mtr@iki.fi>
9 state javascript_string extends Highlight
20 state javascript_internal extends Highlight
36 /* String constants. */
40 reference_face (true);
42 reference_face (false);
55 call (javascript_string);
59 /* Function definitions. */
60 /\b(function)([ \t]+)([A-Za-z\$_][A-Za-z\$_0-9]*)([ \t]*\()/ {
67 function_name_face (true);
69 function_name_face (false);
76 abstract boolean break byte case catch char class const continue
77 default do double else extends false final finally float for function
78 goto if implements import in instanceof int interface long native new
79 null package private protected public return short static super switch
80 synchronized this throw throws transient true try var void while with
83 /\b(abstract|b(oolean|reak|yte)|c(a(se|tch)|har|lass|on(st|tinue))\
84 |d(efault|o(|uble))|e(lse|xtends)|f(alse|inal(|ly)|loat|or|unction)\
85 |goto|i(f|mp(lements|ort)|n(|stanceof|t(|erface)))|long\
86 |n(ative|ew|ull)|p(ackage|r(ivate|otected)|ublic)|return\
87 |s(hort|tatic|uper|witch|ynchronized)|t(h(is|row(|s))|r(ansient|ue|y))\
88 |v(ar|oid)|w(hile|ith))\b/ {
95 (build-re '(Math Date eval parseInt parseFloat))
97 /\b(Date|Math|eval|parse(Float|Int))\b/ {
100 builtin_face (false);
103 /* Terminator for nested JavaScript programs. */
104 /<\/[sS][cC][rR][iI][pP][tT]>/ {
105 from_html_terminator = $0;
110 state javascript extends HighlightEntry
113 call (javascript_internal);