trying to get the line number when the content in monaco-editor matches the tokenizer as invalid,then I can use editor.deltaDecorations
to customize the UI,
sample of tokenizer in monaco:
[/0[xX][0-9a-fA-F]+b/, { token: 'constant.numeric' }],
[/[+-]?d+(?:(?:.d*)?(?:[eE][+-]?d+)?)?b/, { token: 'constant.numeric' }],
[/(?:true|false)b/, { token: 'constant.boolean' }],
// strings
[/["']([^'"\]|\.)*$/, 'string.invalid'], // non-teminated string
{ include: '@whitespace' },
[///.*$/, { token: 'invalid' }],
expected UI:
However, I didn’t find a way to get the line numbers as a list. Does anyone know how to work it out?