slicekit 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17,7 +17,9 @@
17
17
  // The file's own root is the nearest directory above it holding `.slicekit/config.json`, else its git
18
18
  // top level, else the session's root: a session in the main checkout editing a nested worktree is
19
19
  // judged by the worktree's branch, state and config. Paths are canonicalised through the real path of
20
- // their deepest existing ancestor, so 8.3 short names and links resolve; on win32 a `:` after the drive
20
+ // their deepest existing ancestor, so 8.3 short names and links resolve; for rule (4) the path is also
21
+ // judged as named, with a leading link or junction that reaches the root or a directory in it read as
22
+ // that directory, and a relative name against the working directory as given; on win32 a `:` after the drive
21
23
  // (an NTFS stream name) is refused outright.
22
24
  //
23
25
  // Limits: a Bash command that writes the same file is pre-bash's business.
@@ -29,7 +31,7 @@ import { parseSliceAddr } from '../ids.js';
29
31
  import { kitPaths } from '../paths.js';
30
32
  import { phaseOfDir } from '../slicefile.js';
31
33
  import { allow, deny } from './io.js';
32
- import { activeSlice, denyPaths, existingAncestor, fromGitBash, matchesDeny, real, toPosix } from './paths.js';
34
+ import { activeSlice, denyPaths, existingAncestor, fromGitBash, leaves, matchesDeny, namesUnder, real, toPosix } from './paths.js';
33
35
 
34
36
  const WIN = process.platform === 'win32';
35
37
  const GUARDED_STATES = new Set(['tests-red', 'building']);
@@ -41,25 +43,29 @@ const under = (p, dir) => same(p, dir) || key(p).startsWith(`${key(dir)}/`);
41
43
 
42
44
  function relInside(root, abs) {
43
45
  const rel = path.relative(root, abs);
44
- if (rel === '' || rel.startsWith('..') || path.isAbsolute(rel)) return null;
46
+ if (rel === '' || leaves(rel)) return null;
45
47
  return toPosix(rel);
46
48
  }
47
49
 
48
50
  // -> the canonical absolute path. Accepts absolute Windows paths with either slash, Git Bash `/c/...`
49
51
  // on win32, and relative paths (against cwd, else root). Throws on a win32 stream name.
50
52
  function absolute(filePath, root, cwd) {
51
- return real(written(filePath, root, cwd));
53
+ return real(written(filePath, root, cwd)[0]);
52
54
  }
53
55
 
54
- // -> the absolute path as named, its symlinks not followed: the directory it is named from is
55
- // canonical, the rest is the text (`data/link.txt` stays under data even when it points outside).
56
+ // -> the absolute paths as named, their symlinks not followed (`data/link.txt` stays under data even
57
+ // when it points outside): a relative name against the canonical directory it is named from and
58
+ // against that directory as given, which differ when the working directory is itself a link.
56
59
  function written(filePath, root, cwd) {
57
60
  const p = fromGitBash(String(filePath).replace(/\\/g, '/'));
58
61
  if (WIN && p.replace(/^[A-Za-z]:/, '').includes(':')) {
59
62
  throw new Error(`${filePath}: a stream name is not a file path`);
60
63
  }
61
64
  const base = typeof cwd === 'string' && cwd !== '' ? path.resolve(root, fromGitBash(cwd.replace(/\\/g, '/'))) : root;
62
- return path.isAbsolute(p) ? path.resolve(p) : path.resolve(real(base), p);
65
+ if (path.isAbsolute(p)) return [path.resolve(p)];
66
+ const canonical = path.resolve(real(base), p);
67
+ const given = path.resolve(base, p);
68
+ return given === canonical ? [canonical] : [canonical, given];
63
69
  }
64
70
 
65
71
  // -> the POSIX path relative to root, or null when it is outside root.
@@ -136,11 +142,16 @@ function judge(filePath, input, hookRoot, hookCfg) {
136
142
 
137
143
  // (4), the path as named: a symlink under a listed directory that points out of the repository
138
144
  // resolves outside it, and its listed name must still count.
139
- const lex = written(filePath, hookRoot, input.cwd);
140
- for (const [r, c] of [[hookCanon, hookCfg], [root, cfg]]) {
141
- const named = relInside(r, lex);
142
- const hit = named === null ? null : matchesDeny(named, denyPaths(c));
143
- if (hit !== null) return deny(`${named} matches agents.denyPaths pattern ${hit}; agents may not read or change it (REQ-3.13)`);
145
+ // A name that reaches the root, or a directory in it, by a link is read from there too (issue #122).
146
+ for (const lex of written(filePath, hookRoot, input.cwd)) {
147
+ for (const [r, c] of [[hookCanon, hookCfg], [root, cfg]]) {
148
+ if (!denyPaths(c).length) continue;
149
+ for (const p of namesUnder(r, lex)) {
150
+ const named = relInside(r, p);
151
+ const hit = named === null ? null : matchesDeny(named, denyPaths(c));
152
+ if (hit !== null) return deny(`${named} matches agents.denyPaths pattern ${hit}; agents may not read or change it (REQ-3.13)`);
153
+ }
154
+ }
144
155
  }
145
156
  if (rel === null) return allow();
146
157
 
package/src/journal.js CHANGED
@@ -387,12 +387,13 @@ function bytesAt(root, rev, rel) {
387
387
  // as {file, hash} with its last hash at the merge ('-' when it has none). A file is owed a line when its
388
388
  // last hash at the merge differs from the last hash the heads log `recorded` gives for it. A file the log
389
389
  // does not name is owed one when its last hash differs from its last hash at the newest merge the log
390
- // names (absent there counts as different). While the log names no merge yet, a merge commit with two
391
- // or more parents compares against its first parent, the default branch before the merge; any other
392
- // commit (a fast-forward, rebase or squash push, or a root commit) owes a line for every journal file it
393
- // holds, because git alone cannot say where its push began and check --ci must compute the same set.
394
- // So a push of several commits and a merge whose sync pull request was superseded before it merged both
395
- // get their lines from the next sync. `recorded`
390
+ // names (absent there counts as different). While the log names no merge yet, the commit owes a line
391
+ // for every journal file it holds: a merge commit with two or more parents as a fast-forward, rebase or
392
+ // squash push or a root commit (issue #129). Git alone cannot say where the first recorded push began,
393
+ // and a comparison against a merge's first parent left out the files of an earlier merge whose sync
394
+ // pull request never merged; check --ci computes the same set. So a push of several commits and a merge
395
+ // whose sync pull request was superseded before it merged both get their lines from the next sync, the
396
+ // first one included. `recorded`
396
397
  // is the heads log text the lines will be appended to; it defaults to the log at the merge commit.
397
398
  // Computed from git alone. Throws GitError when `merge` is not a commit of this clone.
398
399
  export function headsFiles(root, cfg, merge, { recorded } = {}) {
@@ -407,11 +408,8 @@ export function headsFiles(root, cfg, merge, { recorded } = {}) {
407
408
  named.set(p.file, p.hash);
408
409
  lastMerge = p.merge;
409
410
  }
410
- const base = lastMerge !== null
411
- ? gitOr(root, ['rev-parse', '--verify', '--quiet', '--end-of-options', `${lastMerge}^{commit}`], '')
412
- : gitOr(root, ['rev-parse', '--verify', '--quiet', '--end-of-options', `${sha}^2`], '') === ''
413
- ? ''
414
- : gitOr(root, ['rev-parse', '--verify', '--quiet', '--end-of-options', `${sha}^1`], '');
411
+ // No merge named: nothing to compare against, so every journal file the commit holds is owed a line.
412
+ const base = lastMerge === null ? '' : gitOr(root, ['rev-parse', '--verify', '--quiet', '--end-of-options', `${lastMerge}^{commit}`], '');
415
413
  const inDir = (listed) => (listed === '' ? [] : listed.split('\n'))
416
414
  .map((f) => f.replace(/\r$/, ''))
417
415
  .filter((f) => f.startsWith(`${relDir}/`) && f.endsWith('.log') && !f.slice(relDir.length + 1).includes('/'));
@@ -4,6 +4,10 @@
4
4
  // (patch 0) when a slice it names leaves every slice of that slice's phase `merged` or `released`.
5
5
  // One version per sync; its section names every slice it versions.
6
6
  //
7
+ // A phase gets its minor version once (D-96). The changelog is the record here too: a phase whose
8
+ // line a CHANGELOG.md section at the merge holds has had its minor version. A slice added to that
9
+ // phase later is a patch version, and its section names that slice alone, with no phase line.
10
+ //
7
11
  // The changelog is the record (D-92). The slices a sync versions are the merged slices that no
8
12
  // CHANGELOG.md section at the merge names, less those that began at or before the floor: the
9
13
  // newest commit that set the version by hand, or the commit that turned `release.auto` on when
@@ -209,6 +213,16 @@ function namesSlice(sections, id) {
209
213
  return sections.some((l) => re.test(l));
210
214
  }
211
215
 
216
+ // Whether a changelog section holds the line of the phase `id` (P1), with or without a name: the
217
+ // phase has had its minor version (D-96). Phase 1's line is not Phase 11's.
218
+ function namesPhase(sections, id) {
219
+ const number = id.replace(/^P/, '');
220
+ return sections.some((l) => {
221
+ const line = l.trimEnd();
222
+ return isPhaseLine(line) && (line === phaseText(number, '') || line.startsWith(`Phase ${number}:`));
223
+ });
224
+ }
225
+
212
226
  // Whether the commit `rev` set the version: package.json at it holds a version and CHANGELOG.md at
213
227
  // it holds that version's section, and its first parent does not hold both. So the commit brought
214
228
  // the version, the section, or the two together. A first commit sets none, and neither does a
@@ -394,8 +408,10 @@ export function releaseFor(root, cfg, { merge = 'HEAD' } = {}) {
394
408
  }
395
409
  // In the order they began, oldest first; the slices of one commit in the order of their files.
396
410
  merges.sort((x, y) => y.at - x.at);
411
+ // A phase is completed by this sync only when no section at the merge holds its line (D-96).
397
412
  const phases = [];
398
413
  for (const id of [...new Set(merges.map((m) => m.phase).filter(Boolean))]) {
414
+ if (namesPhase(sections, id)) continue;
399
415
  const slices = all.filter((s) => s.phase === id);
400
416
  if (slices.length > 0 && slices.every((s) => DONE.includes(s.state))) {
401
417
  phases.push({ id, name: phaseName(slices[0].phaseDir, id), slices });
package/src/workflow.js CHANGED
@@ -58,24 +58,202 @@ export function runsOnValue(runsOn) {
58
58
  export const DEFAULT_JAVA = 25;
59
59
  const BUILD_FILES = { 'pom.xml': 'maven', 'build.gradle': 'gradle', 'build.gradle.kts': 'gradle' };
60
60
  // The tool counts only where a shell runs it: as the first word of a simple command. The command is
61
- // split at line breaks and at ; & | ( ); in each part, NAME=value assignments and the wrapper words
62
- // below (with the flags after them) and shell keywords such as then or do are skipped; a shell started with a flag holding c (sh -c,
61
+ // split at line breaks and at ; & | ( ) outside quotes, and each part into words as a shell splits
62
+ // them (shellCommands below); in each part, NAME=value assignments and the wrapper words
63
+ // below (with the flags after them) and shell keywords such as then or do are skipped; a flag of a
64
+ // wrapper that takes a value (sudo -u runner, nice -n 10, env -u FOO) has that value skipped with it,
65
+ // so the value is never read as the command (issue #136); a shell started with a flag holding c (sh -c,
63
66
  // bash -lc) has its script read the same way. A mention such as echo "mvn test" or rg 'gradle' docs
64
67
  // is an argument, not a call.
65
68
  const JAVA_TOOLS = { mvn: 'maven', gradle: 'gradle', './gradlew': 'gradle' };
66
- const WRAPPERS = new Set(['env', 'time', 'nice', 'nohup', 'exec', 'command', 'sudo', 'xvfb-run']);
69
+ // Each wrapper word, with its options that take a value in the next word: the letters of the short
70
+ // ones and the names of the long ones. `--user=runner` and `-urunner` hold their value themselves.
71
+ const WRAPPER_VALUES = {
72
+ env: { short: 'uC', long: ['unset', 'chdir'] },
73
+ time: { short: 'fo', long: ['format', 'output'] },
74
+ nice: { short: 'n', long: ['adjustment'] },
75
+ nohup: { short: '', long: [] },
76
+ exec: { short: 'a', long: [] },
77
+ command: { short: '', long: [] },
78
+ sudo: { short: 'CDghpRrTtUu', long: ['close-from', 'chdir', 'group', 'host', 'prompt', 'chroot', 'role', 'command-timeout', 'type', 'other-user', 'user'] },
79
+ 'xvfb-run': { short: 'efnpsw', long: ['error-file', 'auth-file', 'server-num', 'xauth-protocol', 'server-args', 'wait'] },
80
+ };
81
+ const WRAPPERS = new Set(Object.keys(WRAPPER_VALUES));
82
+ // Whether the flag `word` of `wrapper` takes its value from the next word. In a cluster of short
83
+ // flags the first one that takes a value ends the flags: what follows it in the word is its value.
84
+ function takesNextWord(wrapper, word) {
85
+ const { short, long } = WRAPPER_VALUES[wrapper];
86
+ if (word.startsWith('--')) return long.includes(word.slice(2));
87
+ const at = [...word.slice(1)].findIndex((c) => short.includes(c));
88
+ return at !== -1 && at === word.length - 2;
89
+ }
67
90
  const SHELLS = new Set(['sh', 'bash', 'zsh', 'dash']);
68
91
  // Shell keywords that open a command position: if ...; then mvn verify; fi.
69
92
  const KEYWORDS = new Set(['if', 'then', 'else', 'elif', 'do', 'while', 'until', '!', '{']);
93
+ // The simple commands of a shell command, each a list of words, read as a shell splits them (review H-1
94
+ // of round 1 of P6/S-51): a word ends at unquoted white space; a line break or one of ; & | ( ) ends a
95
+ // command only outside quotes; '...' is taken as written, "..." with a backslash before $, a backtick,
96
+ // " or \ read as an escape, and a backslash outside quotes takes the next character as written (before
97
+ // a line break it joins the two lines). Each word is { value, lead, known }: lead is the unquoted
98
+ // text the word starts with, which is what makes it an assignment or a keyword.
99
+ // Text the shell does not split is not split here either (review H-4 of round 2 of P6/S-51), so a
100
+ // quote character in it opens no quote:
101
+ // - a comment: a # that begins a word, to the end of its line;
102
+ // - a here-document body: after <<WORD or <<-WORD (WORD quoted or not), the lines that follow the line
103
+ // of the operator, up to the line that is WORD (after its leading tabs for <<-). <<< is a here-string,
104
+ // not a here-document. When no line is WORD, no body is held back and the lines are read as commands.
105
+ // The result is { commands, open, bodies }: open says a quote was still open at the end, bodies holds
106
+ // the here-document bodies; toolCalled reads both again line by line (see there).
107
+ // Two cases cannot be split with certainty:
108
+ // - an unclosed quote: the quoted text runs to the end of the command, as a shell reads on for the
109
+ // closing quote, so no word after the quote is read as a command;
110
+ // - a command substitution, $(...) or a pair of backticks: its output is not known, so the word that
111
+ // holds it has known false and is never read as a tool, a wrapper, a keyword or a shell, though it
112
+ // is still one word; the command inside it is read as a command of its own, since the shell runs it.
113
+ // The delimiter of a here-document whose operator << ends before s[at]: { word, tabs, next }, with the
114
+ // quotes of the word removed, tabs true for <<-, and next the index after the word. null when no word follows.
115
+ function hereDelimiter(s, at) {
116
+ let i = at;
117
+ const tabs = s[i] === '-';
118
+ if (tabs) i += 1;
119
+ while (s[i] === ' ' || s[i] === '\t') i += 1;
120
+ const from = i;
121
+ let word = '';
122
+ while (i < s.length && !/[\s;&|()<>]/.test(s[i])) {
123
+ if (s[i] === "'" || s[i] === '"') {
124
+ const close = s.indexOf(s[i], i + 1);
125
+ if (close === -1) return null;
126
+ word += s.slice(i + 1, close);
127
+ i = close + 1;
128
+ } else {
129
+ if (s[i] === '\\' && i + 1 < s.length) i += 1;
130
+ word += s[i];
131
+ i += 1;
132
+ }
133
+ }
134
+ return i > from ? { word, tabs, next: i } : null;
135
+ }
136
+ function shellCommands(command) {
137
+ const commands = [];
138
+ const bodies = [];
139
+ let open = false;
140
+ const script = (s, start, inSubstitution) => {
141
+ let words = [];
142
+ let word = null;
143
+ let depth = 0;
144
+ let i = start;
145
+ let pending = [];
146
+ // Skips the bodies of the here-documents named on the line that ended just before s[i].
147
+ const hereBodies = () => {
148
+ for (const h of pending) {
149
+ let k = i;
150
+ while (k < s.length) {
151
+ const nl = s.indexOf('\n', k);
152
+ const end = nl === -1 ? s.length : nl;
153
+ const line = s.slice(k, end).replace(/\r$/, '');
154
+ if ((h.tabs ? line.replace(/^\t+/, '') : line) === h.word) {
155
+ bodies.push(s.slice(i, k));
156
+ i = Math.min(end + 1, s.length);
157
+ break;
158
+ }
159
+ k = end + 1;
160
+ }
161
+ }
162
+ pending = [];
163
+ };
164
+ const begin = () => { word ??= { value: '', lead: '', known: true, quoted: false }; return word; };
165
+ const add = (text, quoted) => {
166
+ const w = begin();
167
+ if (quoted) w.quoted = true;
168
+ else if (!w.quoted) w.lead += text;
169
+ w.value += text;
170
+ };
171
+ const endWord = () => { if (word) { words.push({ value: word.value, lead: word.lead, known: word.known }); word = null; } };
172
+ const endCommand = () => { endWord(); if (words.length > 0) commands.push(words); words = []; };
173
+ // A substitution starting at s[i]: reads its commands, marks the word, and returns the index after it.
174
+ const substitution = () => {
175
+ const w = begin();
176
+ w.known = false;
177
+ w.quoted = true;
178
+ if (s[i] === '$') return script(s, i + 2, true);
179
+ let inner = '';
180
+ let k = i + 1;
181
+ while (k < s.length && s[k] !== '`') {
182
+ if (s[k] === '\\' && k + 1 < s.length) k += 1;
183
+ inner += s[k];
184
+ k += 1;
185
+ }
186
+ script(inner, 0, false);
187
+ return k + 1;
188
+ };
189
+ while (i < s.length) {
190
+ const c = s[i];
191
+ if (c === '\\') {
192
+ if (s[i + 1] === '\n') { i += 2; continue; }
193
+ if (i + 1 < s.length) add(s[i + 1], true);
194
+ i += 2;
195
+ } else if (c === "'") {
196
+ const close = s.indexOf("'", i + 1);
197
+ if (close === -1) open = true;
198
+ add(s.slice(i + 1, close === -1 ? s.length : close), true);
199
+ i = close === -1 ? s.length : close + 1;
200
+ } else if (c === '"') {
201
+ add('', true);
202
+ i += 1;
203
+ while (i < s.length && s[i] !== '"') {
204
+ if (s[i] === '\\' && '$`"\\\n'.includes(s[i + 1] ?? ' ')) { if (s[i + 1] !== '\n') add(s[i + 1], true); i += 2; }
205
+ else if ((s[i] === '$' && s[i + 1] === '(') || s[i] === '`') i = substitution();
206
+ else { add(s[i], true); i += 1; }
207
+ }
208
+ if (i >= s.length) open = true;
209
+ i += 1;
210
+ } else if ((c === '$' && s[i + 1] === '(') || c === '`') {
211
+ i = substitution();
212
+ } else if (c === '#' && word === null) {
213
+ while (i < s.length && s[i] !== '\n') i += 1;
214
+ } else if (c === '<' && s[i + 1] === '<' && s[i + 2] !== '<' && s[i - 1] !== '<' && hereDelimiter(s, i + 2)) {
215
+ const here = hereDelimiter(s, i + 2);
216
+ endWord();
217
+ pending.push(here);
218
+ i = here.next;
219
+ } else if (c === '\n' || ';&|()'.includes(c)) {
220
+ endCommand();
221
+ i += 1;
222
+ if (c === '\n') hereBodies();
223
+ if (c === '(') depth += 1;
224
+ else if (c === ')') {
225
+ if (depth > 0) depth -= 1;
226
+ else if (inSubstitution) return i;
227
+ }
228
+ } else if (/\s/.test(c)) {
229
+ endWord();
230
+ i += 1;
231
+ } else {
232
+ add(c, false);
233
+ i += 1;
234
+ }
235
+ }
236
+ endCommand();
237
+ return i;
238
+ };
239
+ script(String(command), 0, false);
240
+ return { commands, open, bodies };
241
+ }
242
+ // The reading before review H-1 of round 1 of P6/S-51: each line and each part between ; & | ( ) on its
243
+ // own, split at white space, with no quote read. It is the floor under the word reader (toolCalled).
70
244
  const unquote = (word) => word.replace(/^["']+|["']+$/g, '');
71
- function toolCalled(command) {
245
+ function toolCalledByLine(command) {
72
246
  for (const part of String(command).split(/[\n;&|()]+/)) {
73
247
  const words = part.trim().split(/\s+/).filter(Boolean);
74
248
  let i = 0;
75
249
  while (i < words.length) {
76
250
  const word = unquote(words[i]);
77
251
  if (/^[A-Za-z_][A-Za-z0-9_]*=/.test(word) || KEYWORDS.has(word)) { i += 1; continue; }
78
- if (WRAPPERS.has(word)) { i += 1; while (i < words.length && words[i].startsWith('-')) i += 1; continue; }
252
+ if (WRAPPERS.has(word)) {
253
+ i += 1;
254
+ while (i < words.length && words[i].startsWith('-')) i += takesNextWord(word, unquote(words[i])) ? 2 : 1;
255
+ continue;
256
+ }
79
257
  break;
80
258
  }
81
259
  if (i >= words.length) continue;
@@ -84,7 +262,49 @@ function toolCalled(command) {
84
262
  if (SHELLS.has(first)) {
85
263
  const flag = words.findIndex((w, k) => k > i && /^-[A-Za-z]*c[A-Za-z]*$/.test(w));
86
264
  if (flag !== -1) {
87
- const inner = toolCalled(unquote(words.slice(flag + 1).join(' ')));
265
+ const inner = toolCalledByLine(unquote(words.slice(flag + 1).join(' ')));
266
+ if (inner) return inner;
267
+ }
268
+ }
269
+ }
270
+ return null;
271
+ }
272
+ // The tool the word reader finds. When it finds none, the floor (review H-4 of round 2 of P6/S-51):
273
+ // - a quote was still open at the end, so the words after it were held as quoted text: the whole
274
+ // command is read again line by line, and a tool that reading finds counts;
275
+ // - a here-document body was held back as text: each body is read line by line, since a body can be
276
+ // the script of a shell (bash <<EOF) and the reader does not know which command reads it.
277
+ // In these two cases the reader finds no less than the line-by-line reading did, at the cost of a JDK
278
+ // step for a mention after an unclosed quote or in a here-document that no shell runs.
279
+ function toolCalled(command) {
280
+ const { commands, open, bodies } = shellCommands(command);
281
+ const read = toolRead(commands);
282
+ if (read) return read;
283
+ if (open) return toolCalledByLine(command);
284
+ return bodies.map(toolCalledByLine).find(Boolean) ?? null;
285
+ }
286
+ function toolRead(commands) {
287
+ for (const words of commands) {
288
+ const is = (w, set) => w.known && set.has(w.value);
289
+ let i = 0;
290
+ while (i < words.length) {
291
+ const word = words[i];
292
+ if (/^[A-Za-z_][A-Za-z0-9_]*=/.test(word.lead) || (word.lead === word.value && is(word, KEYWORDS))) { i += 1; continue; }
293
+ if (is(word, WRAPPERS)) {
294
+ i += 1;
295
+ while (i < words.length && words[i].value.startsWith('-')) i += words[i].known && takesNextWord(word.value, words[i].value) ? 2 : 1;
296
+ continue;
297
+ }
298
+ break;
299
+ }
300
+ if (i >= words.length) continue;
301
+ const first = words[i];
302
+ if (!first.known) continue;
303
+ if (JAVA_TOOLS[first.value]) return JAVA_TOOLS[first.value];
304
+ if (SHELLS.has(first.value)) {
305
+ const flag = words.findIndex((w, k) => k > i && /^-[A-Za-z]*c[A-Za-z]*$/.test(w.value));
306
+ if (flag !== -1 && flag + 1 < words.length) {
307
+ const inner = toolCalled(words[flag + 1].value);
88
308
  if (inner) return inner;
89
309
  }
90
310
  }