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