ballerina-lang icon indicating copy to clipboard operation
ballerina-lang copied to clipboard

[New Feature]: Provide completion and related LS support for new regex support

Open IMS94 opened this issue 2 years ago • 2 comments

Description

Consider the following new addition to support regex:

 string:RegExp regex = re `[0-9a-${endChar}]`;

LS should support completion support etc here.

Related area

-> Editor

IMS94 avatar Oct 06 '22 09:10 IMS94

Related Github discussion: https://github.com/ballerina-platform/ballerina-lang/discussions/36805

dulajdilshan avatar Oct 18 '22 08:10 dulajdilshan

Compiler FE changes: https://github.com/ballerina-platform/ballerina-lang/pull/37916

dulajdilshan avatar Oct 18 '22 08:10 dulajdilshan

LS requirements can be found in the comments in RegExp KT

dulajdilshan avatar Oct 20 '22 09:10 dulajdilshan

Wondering if it is possible to support ReBaseQuantifier, ReSyntaxChar, and whatever we have a set of options. It shouldn't anyway be a completion since we can't be sure what the next node be. But maybe just suggestions when we do 'Ctrl + Space'?

pcnfernando avatar Nov 10 '22 04:11 pcnfernando