intersystems / language-server

Repository for the VS Code Language Server
https://marketplace.visualstudio.com/items?itemName=intersystems.language-server
Other
16 stars 6 forks source link

Syntax Errors on modern Javascript #318

Closed baasvancodeza closed 7 months ago

baasvancodeza commented 7 months ago

Type: Bug

Create a class extending %CSP.Page

In the OnPage create a &html< ....... > section. Put in the following code:

<script type="text/javascript">
    function loadTable(searchVal) {
        if (searchVal?.trim().length >= 6) {
            // continue with the AJAX request and table loading
            $("#tableSection").html('');
        } else {
            alert("Search value must be at least 6 characters long.");
            $("#searchInput").focus();
            return;
        }
    }
</script>

Note the Syntax Error given on the ?. in the javascri[pt.

Extension version: 2.4.4 VS Code version: Code 1.88.0 (5c3e652f63e798a5ac2f31ffd0d863669328dc4c, 2024-04-03T13:26:18.741Z) OS version: Windows_NT x64 10.0.22000 Modes:

System Info |Item|Value| |---|---| |CPUs|13th Gen Intel(R) Core(TM) i7-13650HX (20 x 2803)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|undefined| |Memory (System)|31.69GB (16.90GB free)| |Process Argv|--crash-reporter-id e5f860dd-5001-45d4-ad2b-9c8cb79d3a64| |Screen Reader|yes| |VM|0%|