Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(122)

Side by Side Diff: bower_components/google-code-prettify/src/lang-rd.js

Issue 786953007: npm_modules: Fork bower_components into Polymer 0.4.0 and 0.5.0 versions (Closed) Base URL: https://chromium.googlesource.com/infra/third_party/npm_modules.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (C) 2012 Jeffrey Arnold
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 /**
16 * @fileoverview
17 * Support for R documentation (Rd) files
18 *
19 * Minimal highlighting or Rd files, basically just highlighting
20 * macros. It does not try to identify verbatim or R-like regions of
21 * macros as that is too complicated for a lexer. Descriptions of the
22 * Rd format can be found
23 * http://cran.r-project.org/doc/manuals/R-exts.html and
24 * http://developer.r-project.org/parseRd.pdf.
25 *
26 * @author Jeffrey Arnold
27 */
28 PR['registerLangHandler'](
29 PR['createSimpleLexer'](
30 [
31 // whitespace
32 [PR['PR_PLAIN'], /^[\t\n\r \xA0]+/, null, '\t\n\r \xA0'],
33 // all comments begin with '%'
34 [PR['PR_COMMENT'], /^%[^\r\n]*/, null, '%']
35 ],
36 [// special macros with no args
37 [PR['PR_LITERAL'], /^\\(?:cr|l?dots|R|tab)\b/],
38 // macros
39 [PR['PR_KEYWORD'], /^\\[a-zA-Z@]+/],
40 // highlighted as macros, since technically they are
41 [PR['PR_KEYWORD'], /^#(?:ifn?def|endif)/ ],
42 // catch escaped brackets
43 [PR['PR_PLAIN'], /^\\[{}]/],
44 // punctuation
45 [PR['PR_PUNCTUATION'], /^[{}()\[\]]+/]
46 ]),
47 ['Rd', 'rd']);
OLDNEW
« no previous file with comments | « bower_components/google-code-prettify/src/lang-r.js ('k') | bower_components/google-code-prettify/src/lang-scala.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698