Open ogobrecht opened 5 years ago
This feature is not supported yet. I need to improve regExpParser
Hi,
thank you. This feature is used very often these days - in dynamic SQL, templates and also in simple strings to avoid the escape hell by double, triple or even more single quotes. The readability and maintainability of code is much better with it. For me (and may be for many others) it is essential to support this.
If I can help you please let me know - at least for testing or may be also for coding.
Kind regards Ottmar
If you know well regexp, you can always make a PR, to help me to implement such a feature. Thank you.
Hi,
I am totally new to extension development for VS Code. Anyway, I will try it. You will here from me - either with questions or a solution.
Best regards Ottmar
You have 2 sources to adapt:
<dict>
<key>begin</key>
<string>q'(\^\!|\[|\{|#|<|>|\||\()</string>
<key>end</key>
<string>(\^\!|\]|\}|#|<|>|\||\))'</string>
<key>name</key>
<string>string.quoted.alternative.oracle</string>
</dict>
- for symbol recognition: **main\src\lib\regEx\RegExParser.ts**
Some regular expression are used to parse a text and create a tree of symbols.
(This tree is used to display symbol, navigate...)
Hi,
thanks for the infos. I will definitly try it and come back to you. Please do not wonder when it takes a little bit longer (have to finish some things before on my own projects). You will hear from me...
Best regards Ottmar
I am having the same issue and I have the most recent version. Just wondering how do I modify/find plsql.tmLanguage?
Problem is actual.
Extension does not support Alternative Quoting Mechanism (''Q'') for String Literals
https://livesql.oracle.com/apex/livesql/file/content_CIREYU9EA54EOKQ7LAMZKRF6P.html
e.g.
select q'[It's not working]' from dual
Hi again,
when using alternative quoting the symbol recognition is broken and the syntax highlighting is also not working correct.
For a description of the feature please see this Live SQL example from Steven Feuerstein.
Following a code example which is working in SQL Developer without problems (see screenshots below).
Thank you in advance and kind regards Ottmar
End of the story. <-- This "end" inside the text breaks the symbol recognition!
If you remove it, the symbol recognition is working again. Syntax highlighting is not working at all with alternative quotes.
Seems that we have a combined error: The wrong string literal recognition with alternative quotes is breaking the syntax highlighting and the symbol recognition.
More examples here: https://livesql.oracle.com/apex/livesql/file/content_CIREYU9EA54EOKQ7LAMZKRF6P.html
^'; END with_alternative_quotes;
PROCEDURE symbol_not_recognized IS BEGIN NULL; END symbol_not_recognized;
END demo; /