Fix syntax highlighting for anonymous asynchronous agents [#57]
This commit is contained in:
parent
787f4c5299
commit
57586d5456
|
@ -3548,6 +3548,8 @@
|
||||||
'\n': end,
|
'\n': end,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
':': CM_ERROR,
|
||||||
|
'\n': end,
|
||||||
}},
|
}},
|
||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
|
@ -3594,9 +3596,10 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
return Object.assign({
|
return Object.assign({
|
||||||
'...': {type: 'operator', then: {
|
'...': {type: 'operator', then: Object.assign({
|
||||||
'': firstAgentDelayed,
|
'': firstAgentDelayed,
|
||||||
}},
|
':': CM_ERROR,
|
||||||
|
}, connectors)},
|
||||||
}, makeOpBlock({
|
}, makeOpBlock({
|
||||||
exit: firstAgent,
|
exit: firstAgent,
|
||||||
sourceExit: Object.assign({
|
sourceExit: Object.assign({
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -3548,6 +3548,8 @@
|
||||||
'\n': end,
|
'\n': end,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
':': CM_ERROR,
|
||||||
|
'\n': end,
|
||||||
}},
|
}},
|
||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
|
@ -3594,9 +3596,10 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
return Object.assign({
|
return Object.assign({
|
||||||
'...': {type: 'operator', then: {
|
'...': {type: 'operator', then: Object.assign({
|
||||||
'': firstAgentDelayed,
|
'': firstAgentDelayed,
|
||||||
}},
|
':': CM_ERROR,
|
||||||
|
}, connectors)},
|
||||||
}, makeOpBlock({
|
}, makeOpBlock({
|
||||||
exit: firstAgent,
|
exit: firstAgent,
|
||||||
sourceExit: Object.assign({
|
sourceExit: Object.assign({
|
||||||
|
|
|
@ -232,6 +232,8 @@ const makeCommands = ((() => {
|
||||||
'\n': end,
|
'\n': end,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
':': CM_ERROR,
|
||||||
|
'\n': end,
|
||||||
}},
|
}},
|
||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
|
@ -278,9 +280,10 @@ const makeCommands = ((() => {
|
||||||
});
|
});
|
||||||
|
|
||||||
return Object.assign({
|
return Object.assign({
|
||||||
'...': {type: 'operator', then: {
|
'...': {type: 'operator', then: Object.assign({
|
||||||
'': firstAgentDelayed,
|
'': firstAgentDelayed,
|
||||||
}},
|
':': CM_ERROR,
|
||||||
|
}, connectors)},
|
||||||
}, makeOpBlock({
|
}, makeOpBlock({
|
||||||
exit: firstAgent,
|
exit: firstAgent,
|
||||||
sourceExit: Object.assign({
|
sourceExit: Object.assign({
|
||||||
|
|
|
@ -705,7 +705,14 @@ describe('Code Mirror Mode', () => {
|
||||||
cm.getDoc().setValue('A -> ...woo\n... ');
|
cm.getDoc().setValue('A -> ...woo\n... ');
|
||||||
const hints = getHintTexts({ch: 4, line: 1});
|
const hints = getHintTexts({ch: 4, line: 1});
|
||||||
|
|
||||||
expect(hints).toEqual(['woo ']);
|
expect(hints).toContain('woo ');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('suggests anonymous delayed agents', () => {
|
||||||
|
cm.getDoc().setValue('A -> ...\n... ');
|
||||||
|
const hints = getHintTexts({ch: 4, line: 1});
|
||||||
|
|
||||||
|
expect(hints).toContain('-> ');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('suggests agent properties', () => {
|
it('suggests agent properties', () => {
|
||||||
|
|
Loading…
Reference in New Issue