The next procedure compiles without errors in Oracle Database 23ai but produces a syntax error in the VS Code extension 24.3.1.
create or replace procedure p is
begin
$if false $then
This branch can contain arbitrary text.
See https://docs.oracle.com/en/database/oracle/oracle-database/23/lnpls/plsql-language-fundamentals.html#LNPLS-GUID-78F2074C-C799-4CF9-9290-EB8473D0C8FB.
It must not be evaluated by the PL/SQL compiler.
The PL/SQL compiler ignores this block, but the parser in VS Code tries to parse it and reports a syntax error.
There are also frameworks in the wild that use this feature to store metadata in the source code.
$end
null;
end;
/
show errors
Here's the screenshot showing the complete error message:
