Sublime Forum

Dev Build 3111

#11

Looks good for me? Possibly fixed in the latest package patch.

0 Likes

#12

OK. Possibly. Referring to stock 3111 where most of this code becomes green.

0 Likes

#13

I did not see the error you described in the latest version of the syntax. I did, however, use that file to improve the C++ syntax a little more:

  • Detects some macro calls in class/struct/union bodies
  • Has better handling of the friend keyword
0 Likes

#14

@wbond This file is problematic with latest syntax from github: https://chromium.googlesource.com/chromium/src/+/master/extensions/browser/guest_view/web_view/web_view_renderer_state.cc

Stuff after:

WebViewRendererState::WebViewInfo::WebViewInfo(const WebViewInfo& other) =
    default;

is not scoped properly.

0 Likes

#15

The issue you reported has been fixed.

Just so I don’t miss any reports of issues with the default syntaxes, try to report them at https://github.com/sublimehq/Packages/issues.

0 Likes

#16

@wbond I still want some comments about with_prototype behavior (see above). Is it expected or it’s a defect?

0 Likes

#17

The current implementation only applies with_prototype to the last “target” of the push or set. I’ll try to confirm with Jon to ensure that is what he intended.

If you wanted to have it applied to all of the targets, I think there would be a little leg work (an extra context) for each but the last in the stack:

%YAML 1.2
---
# See http://www.sublimetext.com/docs/3/syntax.html
scope: source.example_push_multiple_prototype
contexts:
  main:
  - match: hello
    scope: keyword.operator.word
    push: [test1-pop, test2]
    with_prototype:
    - match: (?=;)
      pop: true
  test1-pop:
    - match: ''
      set: test1
      with_prototype:
        - match: (?=;)
          pop: true
  test1:
    - match: world
      scope: constant.numeric.integer
      pop: true
  test2:
    - match: foobar
      scope: string.unquoted
      pop: true

In general I’ve found with_prototype to be of limited value since it is fairly trivial to introduce infinite recursion. Instead I’ve been tending to use explicit transitions using set and include to bounce from one context to another.

1 Like

#18

Thanks. Recursions can be a nuisance, tried them already. But every time I do a syntax it ends as an endless mess. Was hoping some autogeneration may help a little.

0 Likes

#19

@lastsecondsave out of interest, what language(s) are you building syntax definitions for? :slight_smile:

I too used to struggle quite a bit, and was cursing some of the limitations, but am getting better at it all the time and quite enjoying it now :slight_smile:

0 Likes

#20

@kingkeith The one that is endless mess is for Java, I’m trying to redo my old version from scratch. Shell and Powershell are next in the list.

0 Likes

#21

Ah, those are indeed tricky languages to scope! Have you checked out the work done on https://packagecontrol.io/packages/ShellScriptImproved? :slight_smile:

0 Likes

#22

No. I, for some reason, tend to make my own version of every syntax I use. I do agree, it’s a funny riddle to solve.

0 Likes

#23

Yes, Java and Shell are on my list to get cleaned up. Both are kind of a mess right now, but Shell has the most open issues.

Over the past few days I made some fixes to Java. If you know of any issues, please do post bugs at https://github.com/sublimehq/Packages/issues. Examples of broken syntax in any of the default packages are extremely helpful.

Generally, I’m breaking syntaxes down into smaller, more manageable named chunks, categorizing them into statements/expressions and then improving word boundaries, adding comments, improving matching of meta scopes, adding scopes to various punctuation, etc.

1 Like

#24

Sorry for asking, but how do I update Sublime Text beta3 to this release? Used only the downloadable beta build 3103 untill now.

0 Likes

#25

I believe you have to download it and install it manually, AFAIK you can’t switch from the beta channel to the dev channel (or vice versa) any other way.

0 Likes

#26

could you provide me the dl link? i am too stupid or too tired to find it myself :frowning:

0 Likes

#27

https://www.sublimetext.com/3dev

0 Likes

#28

@jps Please reconsider working on Dev Build 3098 and Dev Build 3098

where @aziz suggested

window.is_minimap_visible()
window.is_status_bar_visible()
window.is_tabs_visible()

and giving attributes to sidebar regarding focus. That would help alot, thank you in advance.

0 Likes

#29

I would prefer something named window.is_tab_bar_visible() because is tabs visible is bad grammar and the meaning not as obvious :wink:

1 Like

#30

Yessir :+1:

0 Likes