UNPKG

highlight-ts

Version:

Highlight.JS in TypeScript (and ES6).

65 lines 2.12 kB
"use strict"; /* Language: OpenSCAD Author: Dan Panzarella <alsoelp@gmail.com> Description: OpenSCAD is a language for the 3D CAD modeling software of the same name. Category: scientific */ Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = require("tslib"); var common_1 = require("../common"); var SPECIAL_VARS = { className: 'keyword', begin: '\\$(f[asn]|t|vp[rtd]|children)' }; var LITERALS = { className: 'literal', begin: 'false|true|PI|undef' }; var NUMBERS = { className: 'number', begin: '\\b\\d+(\\.\\d+)?(e-?\\d+)?', relevance: 0 }; var STRING = tslib_1.__assign({}, common_1.QUOTE_STRING_MODE, { illegal: undefined }); var PREPRO = { className: 'meta', keywords: { 'meta-keyword': 'include use' }, begin: 'include|use <', end: '>' }; var PARAMS = { className: 'params', begin: '\\(', end: '\\)', contains: ['self', NUMBERS, STRING, SPECIAL_VARS, LITERALS] }; var MODIFIERS = { begin: '[*!#%]', relevance: 0 }; var FUNCTIONS = { className: 'function', beginKeywords: 'module function', end: '\\=|\\{', contains: [PARAMS, common_1.UNDERSCORE_TITLE_MODE] }; exports.OpenSCAD = { name: 'openscad', aliases: ['scad'], keywords: { keyword: 'function module include use for intersection_for if else \\%', literal: 'false true PI undef', built_in: 'circle square polygon text sphere cube cylinder polyhedron translate rotate scale resize mirror multmatrix color offset hull minkowski union difference intersection abs sign sin cos tan acos asin atan atan2 floor round ceil ln log pow sqrt exp rands min max concat lookup str chr search version version_num norm cross parent_module echo import import_dxf dxf_linear_extrude linear_extrude rotate_extrude surface projection render children dxf_cross dxf_dim let assign' }, contains: [ common_1.C_LINE_COMMENT_MODE, common_1.C_BLOCK_COMMENT_MODE, NUMBERS, PREPRO, STRING, SPECIAL_VARS, MODIFIERS, FUNCTIONS ] }; //# sourceMappingURL=openscad.js.map