Saleem Abdulrasool
799ad98b21
vim: highlight #file, #line
2016-06-04 11:35:54 -07:00
Saleem Abdulrasool
766c56f407
vim: highlight more delimiters appropriately
2016-06-04 11:35:54 -07:00
Saleem Abdulrasool
51a2df701a
vim: highlight is casts
2016-06-04 11:35:54 -07:00
Saleem Abdulrasool
e8c2ad4da4
vim: remove unnecessary match duplication
2016-06-04 11:35:54 -07:00
Saleem Abdulrasool
c0a8d3f3de
vim: correct categorisation of keywords
...
Remove modifiers from the keywords into the modifiers section. Remove type
specifiers from the keyword group.
2016-06-04 11:35:54 -07:00
Saleem Abdulrasool
00d852d8fc
vim: move remaining keywords
2016-06-04 11:35:54 -07:00
Saleem Abdulrasool
63e67590c8
vim: re-organise import keyword, component highlighting
2016-06-04 11:35:54 -07:00
Saleem Abdulrasool
91ec0e3069
vim: remove duplicate swiftFuncName
...
This was duplicating the swiftTypeName. However, the swiftTypeName is more
generically named and applies to both types and functions both in structure and
usage. Retain the single definition.
2016-06-04 11:35:54 -07:00
Saleem Abdulrasool
9a326fa50e
vim: move the declaration keywords
2016-06-04 11:35:54 -07:00
Saleem Abdulrasool
3dab5cd990
vim: drop new keyword, it is obsolete
2016-06-04 11:35:54 -07:00
Saleem Abdulrasool
844a7d6381
vim: do not highlight keywords in backticks
...
Swift permits the use of reserved keywords as identifiers. Reflect that in the
syntax highlighting.
2016-05-30 21:50:42 -07:00
Saleem Abdulrasool
4dab467654
vim: highlight reethrows as a modifier
2016-05-30 21:50:42 -07:00
Saleem Abdulrasool
0d600fdbf1
vim: highlight attributed function declarations
...
Check for a type declaration following an attribute. This corrects the
highlighting of function types such as:
@noescape (Wrapped) throws -> T
2016-05-30 21:50:42 -07:00
Saleem Abdulrasool
a756131efe
vim: more clever highlighting of generics
...
Perform more clever highlighting of generic clauses. The archetype identifier
is now identified as an identifier, the archtetype type as a type, and the
constraints (where) as special syntax.
2016-05-30 21:50:42 -07:00
Saleem Abdulrasool
5fd99aec6a
vim: not all function keywords get generalised
...
We currently only do init<T>. Only permit generalization of init, not deinit,
subscript.
2016-05-30 21:50:42 -07:00
Saleem Abdulrasool
ba4a17c1d2
vim: differentiate between a type and a typename
...
A typename is a name for a type being defined. A type may contain optionality
as well. This ensures that we do not accidentally highlight an invalid name
such as `InvalidName?` as a type name.
Fix the fact that I had previously created a special group for the array. An
array is a type, so it should be part of the same group.
2016-05-30 21:50:42 -07:00
Saleem Abdulrasool
314699e83c
vim: highlight autoreleasepool
2016-05-28 21:35:55 -07:00
Saleem Abdulrasool
6435ba6748
vim: highlight the throws modifier
...
Highlight the `throws` keyword which indicates a function may throw an
exception.
2016-05-28 21:26:06 -07:00
Saleem Abdulrasool
156bfe8e11
vim: add throw keyword
2016-05-28 21:25:10 -07:00
Saleem Abdulrasool
6b8eae03c3
vim: consider optionality as part of the type
...
Include the optionality of a type as part of the type name.
2016-05-28 21:24:19 -07:00
Saleem Abdulrasool
980b408882
vim: remove destructor keyword for deinit
...
This fixes the highlighting for the "destructor" in swift.
2016-05-28 21:10:28 -07:00
Saleem Abdulrasool
bfd78da590
vim: highlight dynamic modifier
...
Treat `dynamic` as a modifier for functions.
2016-05-28 21:03:04 -07:00
Saleem Abdulrasool
8c5161d6c6
vim: highlight array types in cast target
...
Highlight array types when used for type names as types.
2016-05-28 21:03:04 -07:00
Saleem Abdulrasool
e0a5eddcf3
vim: tweak casting operator highlighting
...
Tweak the matching for swift 2 casting operators (as, as?, as!).
2016-05-28 21:03:04 -07:00
Saleem Abdulrasool
2986b11a15
vim: add dynamicType
...
Include the `dynamicType` keyword in the identifier keywords.
2016-05-28 21:03:04 -07:00
Saleem Abdulrasool
188b70da95
vim: remove support for obsolete attribute syntax
...
Bracketed attributes have not been supported since pre-1.0. Let us consider
them obsoleted.
2016-05-28 19:58:04 -07:00
Saleem Abdulrasool
3ce5337a9a
vim: clean up skipwhite usage
...
The skipwhite option is only relevant when there is a nextgroup directive as
well. Normalise the usage across the file and remove the extraneous skipwhite
directives. NFC.
2016-05-28 11:59:42 -07:00
Saleem Abdulrasool
60cf8f75cd
vim: add try and catch keywords
...
These were missing from the keyword list. Add them.
2016-05-26 20:49:15 -07:00
Saleem Abdulrasool
bc6cac32e2
vim: sort the keyword list
2016-05-26 20:46:56 -07:00
Saleem Abdulrasool
96e64bf10a
vim: change the keyword list into a list
...
Just represent the list of keywords as a visible list. This makes it easier to
see the individual keywords as well as makes it easy to add new keywords in the
future.
2016-05-26 20:45:51 -07:00
Saleem Abdulrasool
caa40e268b
vim: remoe unnecessary keyword option
...
skipwhite does not do anything for keyword matches. Remove the unnecessary
option. NFC.
2016-05-26 20:43:45 -07:00
Dmitri Gribenko
071c80714a
vim: add coloring for 'guard'
2016-05-16 14:46:14 -07:00
Saleem Abdulrasool
df44056ae9
vim: comment out #if false
...
Similar to `#if 0` in C/C++, `#if false` is used to block comment out code.
Treat it as such.
2016-05-16 11:52:38 -07:00
Saleem Abdulrasool
83e702a73e
vim: update syntax file
...
Support `#else` and `#elseif` as valid tokens as well. Also support whitespace
before the #.
2016-05-14 21:32:16 -07:00
Erik Eckstein
c1bcb0b69d
SIL: add new instruction set_deallocating
...
It will be used by the ReleaseDevirtualizer before calling the deallocator.
So far, this is NFC.
2016-03-15 12:56:54 -07:00
Erik Eckstein
1e88689bad
vim-utils: highlight the sil call instructions in a bolder color.
...
Because often these are the most important instructions in a function.
2016-02-09 16:25:43 -08:00
Erik Eckstein
e70b38b1a5
vim-utils: add missing instruction keywords in sil syntax file
2016-02-09 16:25:43 -08:00
practicalswift
71e00fefa1
[gardening] Fix typos: "word word" (two spaces) → "word word" (one space)
2016-01-24 21:27:16 +01:00
Max Moiseev
b29bdd4361
[vim] support for more keywords
...
Support for a newly introduced `associatedtype` as well as `final`,
`override` etc. `get`/`set`, nil`, `as` and `??` will get highlighted
too.
2016-01-22 15:40:29 -08:00
Slava Pestov
250b6055c6
sil.vim: /* */ and // are valid comments in SIL, too
2016-01-08 17:39:23 -08:00
John McCall
5fddd4a704
Remove the autorelease_return and strong_retain_autoreleased instructions.
...
There's a buggy SIL verifier check that was previously tautological,
and it turns out that it's violated, apparently harmlessly. Since it
was already doing nothing, I've commented it out temporarily while
I figure out the right way to fix SILGen to get the invariant right.
2015-12-09 14:50:20 -08:00
Max Moiseev
881b2b48d5
[vim] highlighting FIXME and TODO in comments
2015-12-04 17:31:36 -08:00
Max Moiseev
bc46ab5bc5
Minor tweaks to vim syntax highlighting
...
Highlighting #if/#endif, @attributes, mutating and some more keywords
2015-12-01 15:44:43 -08:00
Chris Willmore
c7c7388cf2
Change do-while to repeat-while.
...
Change all uses of "do { ... } while <cond>" to use "repeat" instead.
Rename DoWhileStmt to RepeatWhileStmt. Add diagnostic suggesting change
of 'do' to 'repeat' if a condition is found afterwards.
<rdar://problem/20336424> rename do/while loops to repeat/while & introduce "repeat <count> {}" loops
Swift SVN r27650
2015-04-23 22:48:31 +00:00
Joe Groff
962a87f444
SIL: Rename address-only existential instructions to '{init,deinit,open}_existential_addr'.
...
For better consistency with other address-only instruction variants, and to open the door to new exciting existential representations (such as a refcounted boxed representation for ErrorType).
Swift SVN r25902
2015-03-09 23:55:31 +00:00
Roman Levenstein
c8d180e660
Generalize the switch_int instruction into switch_value instruction, which may switch on arguments of builtin integer types or function types. The later is required for implementing a more efficient speculative devirtualizaiton implementation. Implement lowering of switch_value into LLVM code. In case of integer operands, it reuses LLVM's switch optimizations. Support for switching on function types is not yet bullet-proof and will be refined in the subsequent patches.
...
rdar://18508812
Swift SVN r23042
2014-10-31 22:55:56 +00:00
Joe Groff
3f23b82e6d
SIL: Rename SILGlobalAddr to GlobalAddr.
...
All globals are SIL globals now.
Swift SVN r22827
2014-10-18 17:08:28 +00:00
Joe Groff
ea65d1e60b
SIL: Remove the builtin_function_ref instruction.
...
Swift SVN r22797
2014-10-16 16:18:40 +00:00
Joe Groff
bb46f4bbd9
SIL: Remove the global_addr instruction.
...
It's no longer needed now that we always lower to SIL globals.
Swift SVN r22693
2014-10-12 17:19:06 +00:00
Joe Groff
782833f054
SIL: Remove the project_existential* instructions.
...
Swift SVN r22457
2014-10-02 04:06:10 +00:00