diff options
Diffstat (limited to 'language-web')
-rw-r--r-- | language-web/src/main/js-gen/mode-problem.js | 41 | ||||
-rw-r--r-- | language-web/webpack.config.js | 14 |
2 files changed, 6 insertions, 49 deletions
diff --git a/language-web/src/main/js-gen/mode-problem.js b/language-web/src/main/js-gen/mode-problem.js deleted file mode 100644 index d962a0bb..00000000 --- a/language-web/src/main/js-gen/mode-problem.js +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
1 | define(["codemirror", "codemirror/addon/mode/simple"], function(CodeMirror, SimpleMode) { | ||
2 | var keywords = "abstract|class|contains|enum|error|extends|false|opposite|pred|problem|refers|scope|true|unknown"; | ||
3 | CodeMirror.defineSimpleMode("xtext/problem", { | ||
4 | start: [ | ||
5 | {token: "comment", regex: "\\/\\*", next : "comment"}, | ||
6 | {token: "string", regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'}, | ||
7 | {token: "quoted-name", regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"}, | ||
8 | {token: "number", regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"}, | ||
9 | {token: "number", regex: "[*]"}, | ||
10 | {token: "comment", regex: "%.*$"}, | ||
11 | {token: "comment", regex: "\\/\\/.*$"}, | ||
12 | {token: "lparen", indent: true, regex: "[[({]"}, | ||
13 | {token: "rparen", dedent: true, regex: "[\\])}]"}, | ||
14 | {indent: true, push: "predicateBody", regex: ":-"}, | ||
15 | {token: "keyword", regex: "\\b(?:" + keywords + ")\\b"} | ||
16 | ], | ||
17 | comment: [ | ||
18 | {token: "comment", regex: ".*?\\*\\/", next : "start"}, | ||
19 | {token: "comment", regex: ".+"} | ||
20 | ], | ||
21 | meta: { | ||
22 | dontIndentStates: ["comment"], | ||
23 | lineComment: "%", | ||
24 | electricChars: "])];" | ||
25 | }, | ||
26 | predicateBody: [ | ||
27 | {token: "comment", regex: "\\/\\*", next : "comment"}, | ||
28 | {token: "string", regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'}, | ||
29 | {token: "quoted-name", regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"}, | ||
30 | {token: "number", regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"}, | ||
31 | {token: "number", regex: "[*]"}, | ||
32 | {token: "comment", regex: "%.*$"}, | ||
33 | {token: "comment", regex: "\\/\\/.*$"}, | ||
34 | {token: "lparen", indent: true, regex: "[[({]"}, | ||
35 | {token: "rparen", dedent: true, regex: "[\\])}]"}, | ||
36 | {dedent: true, dedentIfLineStart: false, pop: true, regex: "\\.\\s*$"}, | ||
37 | {indent: true, dedent: true, regex: "[;]"}, | ||
38 | {token: "keyword", regex: "\\b(?:" + keywords + ")\\b"} | ||
39 | ] | ||
40 | }); | ||
41 | }); | ||
diff --git a/language-web/webpack.config.js b/language-web/webpack.config.js index a44260a1..bd999a85 100644 --- a/language-web/webpack.config.js +++ b/language-web/webpack.config.js | |||
@@ -17,11 +17,9 @@ module.exports = { | |||
17 | module: { | 17 | module: { |
18 | rules: [ | 18 | rules: [ |
19 | { | 19 | { |
20 | test: /\.jsx?$/, | 20 | test: /\.jsx?$/i, |
21 | include: { | 21 | include: [path.resolve(__dirname, 'src/main/js')], |
22 | and: [path.resolve(__dirname, 'src/main/js')], | 22 | exclude: [path.resolve(__dirname, 'src/main/js/xtext')], |
23 | not: [path.resolve(__dirname, 'src/main/js/xtext')], | ||
24 | }, | ||
25 | loader: 'babel-loader', | 23 | loader: 'babel-loader', |
26 | options: { | 24 | options: { |
27 | presets: [ | 25 | presets: [ |
@@ -30,7 +28,7 @@ module.exports = { | |||
30 | }, | 28 | }, |
31 | }, | 29 | }, |
32 | { | 30 | { |
33 | test: /\.scss$/, | 31 | test: /\.scss$/i, |
34 | use: [ | 32 | use: [ |
35 | devMode ? 'style-loader' : MiniCssExtractPlugin.loader, | 33 | devMode ? 'style-loader' : MiniCssExtractPlugin.loader, |
36 | 'css-loader', | 34 | 'css-loader', |
@@ -43,7 +41,7 @@ module.exports = { | |||
43 | ] | 41 | ] |
44 | }, | 42 | }, |
45 | { | 43 | { |
46 | test: /\.(gif|png|jpe?g|svg)$/, | 44 | test: /\.(gif|png|jpe?g|svg)$/i, |
47 | use: [ | 45 | use: [ |
48 | 'file-loader', | 46 | 'file-loader', |
49 | { | 47 | { |
@@ -60,7 +58,7 @@ module.exports = { | |||
60 | modules: [ | 58 | modules: [ |
61 | 'node_modules', | 59 | 'node_modules', |
62 | path.resolve(__dirname, 'src/main/js'), | 60 | path.resolve(__dirname, 'src/main/js'), |
63 | path.resolve(__dirname, 'src/main/js-gen'), | 61 | path.resolve(__dirname, 'build/generated/sources/xtext/js'), |
64 | ], | 62 | ], |
65 | extensions: ['.js', '.jsx'], | 63 | extensions: ['.js', '.jsx'], |
66 | alias: { | 64 | alias: { |