git ssb

0+

cel-desktop / ssb-pkg



Tree: cfc8d49135488f7554210234b3a503c2dbd6c6a5

Files: cfc8d49135488f7554210234b3a503c2dbd6c6a5 / test / test-50-ast-parsing / test-x-index.js

503 bytesRaw
1'use strict';
2
3const fs = require('fs');
4const detector = require('../../lib-es5/detector.js');
5const body = fs.readFileSync('./test-y-data.txt', 'utf8');
6
7detector.detect(
8 body,
9 function (node, trying) {
10 let p;
11 p = detector.visitor_SUCCESSFUL(node, true);
12 if (p) {
13 if (trying) {
14 console.log('try { ' + p + '; } catch (_) {}');
15 } else {
16 console.log(p + ';');
17 }
18 return false;
19 }
20 // TODO maybe NONLITERAL and USESCWD?
21 return true;
22 }
23);
24

Built with git-ssb-web