Skip to content

Commit b414b9e

Browse files
committed
Merge branch 'master' into @__temp__/pull_request
2 parents deead25 + c96b253 commit b414b9e

35 files changed

+1051
-695
lines changed

.gitignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
#
22
# Custom
33
#
4-
\.idea
5-
**/*.dont-sync
6-
**/*.dont-sync.*
4+
*.vsix
75

86

97
#

autogenerated/cpp.embedded.macro.tmLanguage.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

autogenerated/cpp.tmLanguage.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@
8686
{
8787
"include": "#template_definition"
8888
},
89+
{
90+
"include": "#template_explicit_instantiation"
91+
},
8992
{
9093
"include": "#access_control_keywords"
9194
},
@@ -13797,6 +13800,18 @@
1379713800
}
1379813801
]
1379913802
},
13803+
"template_explicit_instantiation": {
13804+
"match": "(?<!\\w)(?:(extern)(?:\\s)+)?(template)(?:\\s)+",
13805+
"captures": {
13806+
"1": {
13807+
"name": "storage.modifier.specifier.extern.cpp"
13808+
},
13809+
"2": {
13810+
"name": "storage.type.template.cpp"
13811+
}
13812+
},
13813+
"name": "meta.template.explicit-instantiation.cpp"
13814+
},
1380013815
"template_isolated_definition": {
1380113816
"match": "(?<!\\w)(template)(?:(?:\\s)+)?(<)(.*)(>)(?:(?:\\s)+)?$",
1380213817
"captures": {

autogenerated/cpp_scopes.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ meta.tail.switch.cpp
245245
meta.tail.union.cpp
246246
meta.template.call.cpp
247247
meta.template.definition.cpp
248+
meta.template.explicit-instantiation.cpp
248249
meta.toc-list.banner.block.cpp
249250
meta.toc-list.banner.double-slash.cpp
250251
meta.using-namespace.cpp
@@ -402,6 +403,7 @@ storage.modifier.lambda.$0.cpp
402403
storage.modifier.pointer.cpp
403404
storage.modifier.reference.cpp
404405
storage.modifier.specifier.$3.cpp
406+
storage.modifier.specifier.extern.cpp
405407
storage.modifier.specifier.functional.post-parameters.$5.cpp
406408
storage.modifier.specifier.functional.pre-parameters.$0.cpp
407409
storage.modifier.specifier.parameter.cpp

commands/project/publish

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env bash
22

33
vsce publish --pat "$1" && echo "published on VSCE"
4-
ovsx publish -p "$2" && echo "published on OVSX"
4+
ovsx publish -p "$2" && echo "published on OVSX"

commands/shell

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#! /usr/bin/env nix-shell
2-
#! nix-shell -i bash -p bash_5 -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/a7ecde854aee5c4c7cd6177f54a99d2c1ff28a31.tar.gz
2+
#! nix-shell -i bash -p bash_5 -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/ce6aa13369b667ac2542593170993504932eb836.tar.gz
33

44
# the comments above^ are special
55
# they tell the system to process this using nix-shell
@@ -85,9 +85,9 @@ if [[ -n "$FORNIX_ARGS" ]]
8585
then
8686
# FIXME: I think the single quotes need to be escaped from the arguments (need to iterate over them, escape each one with single quotes)
8787
# run single command
88-
HOME="$FORNIX_HOME" nix-shell --pure --show-trace --run "zsh -c '$FORNIX_ARGS'" "$__temp_var__nix_shell_file"
88+
HOME="$FORNIX_HOME" nix-shell --pure --show-trace --run "zsh -c '$FORNIX_ARGS'" "$__temp_var__nix_shell_file" -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/a7ecde854aee5c4c7cd6177f54a99d2c1ff28a31.tar.gz --keep __FORNIX_NIX_SETTINGS_PATH --keep __FORNIX_NIX_MAIN_CODE_PATH --keep __FORNIX_NIX_PACKAGES_FILE_PATH --keep __FORNIX_NIX_PATH_EXPORT_FILE --keep __FORNIX_NIX_COMMANDS --keep FORNIX_FOLDER
8989
else
90-
HOME="$FORNIX_HOME" nix-shell --pure --show-trace --command "zsh" "$__temp_var__nix_shell_file"
90+
HOME="$FORNIX_HOME" nix-shell --pure --show-trace --command "zsh" "$__temp_var__nix_shell_file" -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/a7ecde854aee5c4c7cd6177f54a99d2c1ff28a31.tar.gz --keep __FORNIX_NIX_SETTINGS_PATH --keep __FORNIX_NIX_MAIN_CODE_PATH --keep __FORNIX_NIX_PACKAGES_FILE_PATH --keep __FORNIX_NIX_PATH_EXPORT_FILE --keep __FORNIX_NIX_COMMANDS --keep FORNIX_FOLDER
9191
fi
9292
if [ "$FORNIX_DEBUG" = "true" ]; then
9393
echo "exited the nix-shell environment"

documentation/SETUP.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
- (Don't git clone)
66
- Run this: `repo=https://github.com/jeff-hykin/better-cpp-syntax setup_or_copy=setup branch=master eval "$(curl -fsSL git.io/JE2Zm || wget -qO- git.io/JE2Zm)"`
77
- If you're on Windows, run it inside WSL (Ubuntu 20.04 preferably)
8-
- If you're a responsible human being and therefore don't want run a sketchy internet script, props to you 👍. Take a look at the explaination below and you'll be able to run the commands yourself.
8+
- If you're a responsible human being and therefore don't want run a sketchy internet script, props to you 👍. Take a look at the "What is that `eval` command doing?" section at the bottom and you'll be able to run the commands yourself.
99

1010
### If the above instructions didn't make sense
1111

@@ -20,13 +20,13 @@
2020
- Windows users
2121
- Get [WSL](https://youtu.be/av0UQy6g2FA?t=91) (Windows Subsystem for Linux) or [WSL2](https://www.omgubuntu.co.uk/how-to-install-wsl2-on-windows-10)<br>
2222
- If you're not familiar with WSL, I'd recommend [watching a quick thing on it like this one](https://youtu.be/av0UQy6g2FA?t=91)
23-
- Ubuntu 20.04 for WSL is preferred (same as in that linked video), but Ubuntu 21.04 or similar should work.
24-
- [WSL2](https://www.omgubuntu.co.uk/how-to-install-wsl2-on-windows-10) (released August 2020) is needed if you want to use your GPU.<br>
23+
- Ubuntu 20.04 for WSL is preferred (same as in that linked video), but Ubuntu 22.04 or similar should work.
24+
- [WSL2](https://www.omgubuntu.co.uk/how-to-install-wsl2-on-windows-10) (just released August 2020) is needed if you want to use your GPU.<br>
2525
- Once WSL is installed (and you have a terminal logged into WSL) follow the Mac/Linux instructions.
2626
- (tip: when accessing WSL, you probably want to use the VS Code terminal, or the [open source windows terminal](https://github.com/microsoft/terminal) instead of CMD)
2727

2828
After you've finished working and close the terminal, you can always return to project environment by doing
29-
- `cd wherever-you-put-the-project`
29+
- `cd WHEREVER_YOU_PUT_THE_PROJECT`
3030
- `commands/start`
3131

3232
<!--
@@ -51,7 +51,7 @@ Altertive instructions if GUI is needed (matplotlib, tkinter, qt, etc)
5151

5252
### What is that `eval` command doing?
5353

54-
1. Installing nix [manual install instructions here](https://nixos.org/guides/install-nix.html)
54+
1. Installing nix [manual install instructions here](https://nixos.org/download.html)
5555
2. Installing `git` (using nix) if you don't already have git
5656
3. It clones the repository
5757
4. It `cd`'s inside of the repo

documentation/setup.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
- (Don't git clone)
66
- Run this: `repo=https://github.com/jeff-hykin/better-cpp-syntax setup_or_copy=setup branch=master eval "$(curl -fsSL git.io/JE2Zm || wget -qO- git.io/JE2Zm)"`
77
- If you're on Windows, run it inside WSL (Ubuntu 20.04 preferably)
8-
- If you're a responsible human being and therefore don't want run a sketchy internet script, props to you 👍. Take a look at the explaination below and you'll be able to run the commands yourself.
8+
- If you're a responsible human being and therefore don't want run a sketchy internet script, props to you 👍. Take a look at the "What is that `eval` command doing?" section at the bottom and you'll be able to run the commands yourself.
99

1010
### If the above instructions didn't make sense
1111

@@ -20,13 +20,13 @@
2020
- Windows users
2121
- Get [WSL](https://youtu.be/av0UQy6g2FA?t=91) (Windows Subsystem for Linux) or [WSL2](https://www.omgubuntu.co.uk/how-to-install-wsl2-on-windows-10)<br>
2222
- If you're not familiar with WSL, I'd recommend [watching a quick thing on it like this one](https://youtu.be/av0UQy6g2FA?t=91)
23-
- Ubuntu 20.04 for WSL is preferred (same as in that linked video), but Ubuntu 21.04 or similar should work.
24-
- [WSL2](https://www.omgubuntu.co.uk/how-to-install-wsl2-on-windows-10) (released August 2020) is needed if you want to use your GPU.<br>
23+
- Ubuntu 20.04 for WSL is preferred (same as in that linked video), but Ubuntu 22.04 or similar should work.
24+
- [WSL2](https://www.omgubuntu.co.uk/how-to-install-wsl2-on-windows-10) (just released August 2020) is needed if you want to use your GPU.<br>
2525
- Once WSL is installed (and you have a terminal logged into WSL) follow the Mac/Linux instructions.
2626
- (tip: when accessing WSL, you probably want to use the VS Code terminal, or the [open source windows terminal](https://github.com/microsoft/terminal) instead of CMD)
2727

2828
After you've finished working and close the terminal, you can always return to project environment by doing
29-
- `cd wherever-you-put-the-project`
29+
- `cd WHEREVER_YOU_PUT_THE_PROJECT`
3030
- `commands/start`
3131

3232
<!--
@@ -51,7 +51,7 @@ Altertive instructions if GUI is needed (matplotlib, tkinter, qt, etc)
5151

5252
### What is that `eval` command doing?
5353

54-
1. Installing nix [manual install instructions here](https://nixos.org/guides/install-nix.html)
54+
1. Installing nix [manual install instructions here](https://nixos.org/download.html)
5555
2. Installing `git` (using nix) if you don't already have git
5656
3. It clones the repository
5757
4. It `cd`'s inside of the repo

gemset.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@
3030
};
3131
version = "1.0.1";
3232
};
33-
}
33+
}

language_examples/#079.spec.yaml

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
- source: 'template '
1+
- source: template
2+
scopes:
3+
- meta.template.explicit-instantiation
4+
- storage.type.template
25
- source: class
36
scopesBegin:
47
- meta.block.class
@@ -36,9 +39,12 @@
3639
scopesEnd:
3740
- meta.block.class
3841
- source: template
42+
scopes:
43+
- meta.template.explicit-instantiation
44+
- storage.type.template
3945
- source: MyStack
4046
scopes:
41-
- entity.name.scope-resolution
47+
- entity.name.scope-resolution.function.call
4248
- source: <
4349
scopesBegin:
4450
- meta.template.call
@@ -64,7 +70,7 @@
6470
- source: '::'
6571
scopes:
6672
- punctuation.separator.namespace.access
67-
- punctuation.separator.scope-resolution
73+
- punctuation.separator.scope-resolution.function.call
6874
- source: MyStack
6975
scopes:
7076
- entity.name.function.call
@@ -82,9 +88,15 @@
8288
scopes:
8389
- punctuation.terminator.statement
8490
- source: extern
91+
scopesBegin:
92+
- meta.template.explicit-instantiation
8593
scopes:
8694
- storage.modifier.specifier.extern
87-
- source: ' template '
95+
- source: template
96+
scopes:
97+
- storage.type.template
98+
scopesEnd:
99+
- meta.template.explicit-instantiation
88100
- source: class
89101
scopesBegin:
90102
- meta.block.class
@@ -122,12 +134,18 @@
122134
scopesEnd:
123135
- meta.block.class
124136
- source: extern
137+
scopesBegin:
138+
- meta.template.explicit-instantiation
125139
scopes:
126140
- storage.modifier.specifier.extern
127-
- source: ' template'
141+
- source: template
142+
scopes:
143+
- storage.type.template
144+
scopesEnd:
145+
- meta.template.explicit-instantiation
128146
- source: MyStack
129147
scopes:
130-
- entity.name.scope-resolution
148+
- entity.name.scope-resolution.function.call
131149
- source: <
132150
scopesBegin:
133151
- meta.template.call
@@ -153,7 +171,7 @@
153171
- source: '::'
154172
scopes:
155173
- punctuation.separator.namespace.access
156-
- punctuation.separator.scope-resolution
174+
- punctuation.separator.scope-resolution.function.call
157175
- source: MyStack
158176
scopes:
159177
- entity.name.function.call

language_examples/#207.spec.yaml

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,12 @@
4646
- punctuation.section.block.begin.bracket.curly.namespace
4747
scopesEnd:
4848
- meta.head.namespace
49-
- source: 'template '
49+
- source: template
5050
scopesBegin:
5151
- meta.body.namespace
52+
scopes:
53+
- meta.template.explicit-instantiation
54+
- storage.type.template
5255
- source: class
5356
scopesBegin:
5457
- meta.block.class
@@ -79,7 +82,10 @@
7982
- punctuation.terminator.statement
8083
scopesEnd:
8184
- meta.block.class
82-
- source: 'template '
85+
- source: template
86+
scopes:
87+
- meta.template.explicit-instantiation
88+
- storage.type.template
8389
- source: class
8490
scopesBegin:
8591
- meta.block.class
@@ -110,7 +116,10 @@
110116
- punctuation.terminator.statement
111117
scopesEnd:
112118
- meta.block.class
113-
- source: 'template '
119+
- source: template
120+
scopes:
121+
- meta.template.explicit-instantiation
122+
- storage.type.template
114123
- source: class
115124
scopesBegin:
116125
- meta.block.class
@@ -141,7 +150,10 @@
141150
- punctuation.terminator.statement
142151
scopesEnd:
143152
- meta.block.class
144-
- source: 'template '
153+
- source: template
154+
scopes:
155+
- meta.template.explicit-instantiation
156+
- storage.type.template
145157
- source: class
146158
scopesBegin:
147159
- meta.block.class
@@ -173,6 +185,9 @@
173185
scopesEnd:
174186
- meta.block.class
175187
- source: template
188+
scopes:
189+
- meta.template.explicit-instantiation
190+
- storage.type.template
176191
- source: '::'
177192
scopesBegin:
178193
- meta.function.definition.special.operator-overload
@@ -253,6 +268,9 @@
253268
scopes:
254269
- punctuation.terminator.statement
255270
- source: template
271+
scopes:
272+
- meta.template.explicit-instantiation
273+
- storage.type.template
256274
- source: '::'
257275
scopesBegin:
258276
- meta.function.definition.special.operator-overload
@@ -333,6 +351,9 @@
333351
scopes:
334352
- punctuation.terminator.statement
335353
- source: template
354+
scopes:
355+
- meta.template.explicit-instantiation
356+
- storage.type.template
336357
- source: '::'
337358
scopesBegin:
338359
- meta.function.definition.special.operator-overload
@@ -416,6 +437,9 @@
416437
scopes:
417438
- punctuation.terminator.statement
418439
- source: template
440+
scopes:
441+
- meta.template.explicit-instantiation
442+
- storage.type.template
419443
- source: '::'
420444
scopesBegin:
421445
- meta.function.definition.special.operator-overload

language_examples/#432.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
template <class T> struct Explicit {
2+
T t;
3+
};
4+
5+
template<> struct Explicit<void> {};
6+
7+
extern template struct Explicit<int>;
8+
9+
extern
10+
template
11+
struct Explicit<unsigned>;
12+
13+
template struct Explicit<int>;
14+
15+
template
16+
struct Explicit<unsigned>;

0 commit comments

Comments
 (0)