JS: support AutoRest classification

This commit is contained in:
Esben Sparre Andreasen
2018-12-11 08:46:08 +01:00
parent a4b3b1e8c8
commit a295dfd2c5
4 changed files with 9 additions and 2 deletions

View File

@@ -42,8 +42,8 @@ class CodeGeneratorMarkerComment extends GeneratedCodeMarkerComment {
*/
private predicate codeGeneratorMarkerComment(Comment c, string tool) {
exists (string toolPattern |
toolPattern = "js_of_ocaml|CoffeeScript|LiveScript|dart2js|ANTLR|PEG\\.js|Opal|JSX|jison(?:-lex)?" and
tool = c.getText().regexpCapture("(?s)[\\s*]*(?:parser )?[gG]eneratedy? (?:from .*)?by (" + toolPattern + ")\\b.*", 1)
toolPattern = "js_of_ocaml|CoffeeScript|LiveScript|dart2js|ANTLR|PEG\\.js|Opal|JSX|jison(?:-lex)?|(?:Microsoft \\(R\\) AutoRest Code Generator)" and
tool = c.getText().regexpCapture("(?s)[\\s*]*(?:parser |Code )?[gG]eneratedy? (?:from .*)?by (" + toolPattern + ")\\b.*", 1)
)
}

View File

@@ -0,0 +1,5 @@
/*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/

View File

@@ -1,3 +1,4 @@
| AutoRest.js:0:0:0:0 | AutoRest.js | generated |
| ai.1.2.3-build0123.js:0:0:0:0 | ai.1.2.3-build0123.js | library |
| bundle-directive.js:0:0:0:0 | bundle-directive.js | generated |
| data.js:0:0:0:0 | data.js | generated |

View File

@@ -1,3 +1,4 @@
| AutoRest.js:1:1:5:3 | /*\\n * C ... ed.\\n */ | Microsoft (R) AutoRest Code Generator |
| jison-lex.js:1:1:1:34 | /* gene ... .2.1 */ | jison-lex |
| jison.js:1:1:1:38 | /* pars ... 4.13 */ | jison |
| jsx-old.js:1:1:1:106 | // gene ... 977102) | JSX |