Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tokenization breaks on list used as default parameter #135

Open
alexr00 opened this issue Aug 13, 2020 · 4 comments · May be fixed by #136
Open

Tokenization breaks on list used as default parameter #135

alexr00 opened this issue Aug 13, 2020 · 4 comments · May be fixed by #136

Comments

@alexr00
Copy link

alexr00 commented Aug 13, 2020

Originally from @matkoniecz in microsoft/vscode#104423

Issue Type: Bug

screen03

module CartoCSSHelper
  def self.test_tag_on_real_data(tags, new_branch, old_branch, zlevels, types = ['node', 'closed_way', 'way'], min = 4, skip = 0)
    types.each do |type|
      test_tag_on_real_data_for_this_type(tags, new_branch, old_branch, zlevels, type, min, skip)
    end
  end
end

It is a valid syntax that will confuse code highlighting

VS Code version: VSCodium 1.47.3 (91899dcef7b8110878ea59626991a18c8a6a1b3e, 2020-07-28T10:50:43.978Z)
OS version: Linux x64 5.4.0-42-generic

System Info
Item Value
CPUs Intel(R) Core(TM)2 Duo CPU T6600 @ 2.20GHz (2 x 2194)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: disabled_off
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: disabled_software
skia_renderer: disabled_off_ok
video_decode: unavailable_off
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off_ok
webgl: enabled
webgl2: enabled
Load (avg) 2, 2, 2
Memory (System) 3.81GB (0.11GB free)
Process Argv --no-sandbox --unity-launch /home/mateusz/Documents/install_moje/OSM software/bicycle_osm/clearing_cache_run_znajdywanie_celów.sh
Screen Reader no
VM 0%
DESKTOP_SESSION Lubuntu
XDG_CURRENT_DESKTOP LXQt
XDG_SESSION_DESKTOP
XDG_SESSION_TYPE x11
Extensions (3)
Extension Author (truncated) Version
kotlin fwc 0.2.14
csharp ms- 1.22.1
vscode-unitymeta PTD 0.0.7
@graceful-potato
Copy link
Contributor

I think I know how to fix it. And I have found another "bug" for method definition without parentheses. This kind of method definition does not support multiline arguments.
Screenshot from 2020-08-22 15-49-02

I could try to make a pr with fixes for these bugs.

@matkoniecz
Copy link

I would really be happy if you would manage to make PR fix for that problem?

method definition without parentheses - is it actually a valid ruby syntax?

@graceful-potato
Copy link
Contributor

method definition without parentheses - is it actually a valid ruby syntax?

yes, it is valid syntax

@graceful-potato graceful-potato linked a pull request Oct 5, 2020 that will close this issue
@graceful-potato
Copy link
Contributor

I apologize for taking so long, my first idea of ​​how to solve it did not fully work, and then I completely forgot about this issue.
I am not very happy about this approach but looks like it works #136

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants