Commit Graph

115 Commits

Author SHA1 Message Date
Saleem Abdulrasool
43d98fe8bd vim: improve attribute handling
The attribute can be applied to a typename or a type declaration.
Correct the handling for the second case.
2019-05-26 14:24:43 -07:00
Saleem Abdulrasool
69674eb95a vim: improve the modifier highlighting
This makes the modifier highlighting stand out against the definition
keyword.
2019-05-25 21:47:12 -07:00
Saleem Abdulrasool
1cede8900e vim: improve syntax highlighting for typealias
This improves the detection of syntax so that the identifier for a
typealias is identified as an identifier, the `=` is identified as a
delimiter, and the type that is aliased is identified as a type.
2019-05-24 17:40:36 -07:00
Saleem Abdulrasool
9ac6fe0137 vim: highlight lazy
`lazy` can modify the `var` definition.  Add that as a modifier.
2019-05-15 11:06:47 -07:00
Saleem Abdulrasool
8a1311d1c3 vim: add open and mutating keywords to SIL
Add a couple of missing modififers to the syntax highlighting for SIL in
vim.
2019-01-26 12:01:07 -08:00
Saleem Abdulrasool
5ead077f85 vim: detect prefix modifier
THe `prefix` modifier applies to prefix operators.  This is used for the
operator definitions, detect the keyword appropriately.
2018-12-31 19:28:32 -08:00
tokorom
472480c118 [vim] Fix default label problem 2018-11-21 11:14:43 +09:00
tokorom
ea2c860ddb [vim] Add swiftDefaultLabelRegion 2018-10-08 14:40:08 +09:00
tokorom
5f3775e319 [vim] Add swiftCaselLabelRegion 2018-10-08 14:37:23 +09:00
tokorom
f037b7edce [vim] add skipempty 2018-09-29 11:09:25 +09:00
tokorom
75b5c11111 [vim] remove nextgroup from swiftTupleIndexNumber 2018-09-26 07:42:29 +09:00
tokorom
fb993301c6 [vim] add swiftTupleIndexNumber 2018-09-26 07:27:40 +09:00
tokorom
b1d4b0be5d [vim] Fix tuple hilight problem with swiftType 2018-09-25 15:58:00 +09:00
tokorom
a67a37ecbb [vim] Add swiftParenthesisRegion 2018-09-25 11:22:53 +09:00
Arnold Schwaighofer
73df12c09f Remove dead constant_string_literal
constant_string_literal was added to support a one word representation
of String that never materialized.
2018-09-05 12:13:57 -07:00
Dave Lee
24123766f6 Fix swiftPreproc regex in swift.vim (#18994) 2018-08-27 16:22:50 -07:00
Erik Eckstein
c6eb5fe82a minor follow-ups for remove pinning in utilities and docs 2018-08-25 11:14:18 -07:00
Arnold Schwaighofer
5940796cc1 SIL: Add an is_escaping_closure instruction
Will be used to verify that withoutActuallyEscaping's block does not
escape the closure.

``%escaping = is_escaping_closure %closure`` tests the reference count. If the
closure is not uniquely referenced it prints out and error message and
returns true. Otherwise, it returns false. The returned result can be
used with a ``cond_fail %escaping`` instruction to abort the program.

rdar://35525730
2018-03-07 08:56:00 -08:00
Harlan
5e02d2a877 Implement #warning and #error (#14048)
* Implement #warning and #error

* Fix #warning/#error in switch statements

* Fix AST printing for #warning/#error

* Add to test case

* Add extra handling to ParseDeclPoundDiagnostic

* fix dumping

* Consume the right paren even in the failure case

* Diagnose extra tokens on the same line after a diagnostic directive
2018-02-03 18:07:05 -05:00
Saleem Abdulrasool
03456c97a7 vim: improve syntax highlighting for SIL attributes
Add rules to highlight the SIL attributes currently emitted by the swift
compiler.
2017-11-01 20:06:41 -07:00
Saleem Abdulrasool
10bc4722c4 vim: improve syntax highlighting for SIL
Highlight identifiers, `sil_stage`, and function attributes.
2017-10-26 22:36:03 -07:00
Saleem Abdulrasool
8268ac87c6 vim: highlight apply in sil properly 2017-10-26 22:35:39 -07:00
Slava Pestov
0acf3ac8d9 SIL: Remove is_nonnull instruction 2017-10-13 17:38:32 -07:00
Slava Pestov
e806b6248d SIL: Remove dynamic_method instruction 2017-10-04 03:53:16 -07:00
Brian Heim
c95598db55 Vim plugin: expand highlighting coverage (#11444)
* vim-syntax: fix highlighting for indirect case/enum

without skipwhite, `indirect enum` never gets highlighted. this
commit also adds the `indirect case` multiword keyword.

* vim-syntax: allow whitespace before type parameters

Added skipwhite to multiple match groups so that whitespace can be used
before type parameters (`Type <Param>`). This matches Xcode's behavior.

* vim-syntax: update last change line

* vim-syntax: remove indirect case from multiword type def group
2017-09-19 10:06:03 -04:00
Max Moiseev
793b86c056 [vim] Add 'open' as a modifier 2017-09-13 14:06:33 -07:00
Brian Heim
3ac7609b49 Vim: conform highlighting of preprocessor macros (#11391)
* vim-syntax: highlight #function preproc macro

* vim-syntax: highlight preproc macros in string interpolation

* vim syntax: make string interpolation a matchgroup

Now, only the opening \( and ) are highlighted, and everything inside retains its coloring
2017-08-09 16:39:45 -07:00
Saleem Abdulrasool
d45c575f8b vim: update syntax
Properly support `weak` and `indirect enum` keywords.
2017-07-19 15:29:28 -07:00
Andrew Trick
4db2a46cff Add SIL instruction: open_existential_box_value.
This has the same semantics as open_existential_box, but returns an object value
instead of an address.

This is used in SIL opaque values mode. Attempting to reuse open_existential_box
in this mode causes SIL type inconsistencies that are too difficult to work
around. Adding this instruction allows for consistent handling of opaque values.

The original versions of several of these currently redundant instructions will
be removed once the SIL representation stabilizes.
2017-07-17 23:46:41 -07:00
Andrew Trick
f657ad2d3a Rename *ExistentialOpaque instructions to *ExistentialValue.
These instructions have the same semantics as the *ExistentialAddr instructions
but operate directly on the existential value, not its address.

This is in preparation for adding ExistentialBoxValue instructions.
The previous name would cause impossible confusion with "opaque existentials"
and "opaque existential boxes".
2017-07-17 23:46:41 -07:00
Saleem Abdulrasool
7b36b97d2d vim: remove double handling for var, let
`var` and `let` were being handled as a keyword and a variable
definition keyword.  Avoid the first match.
2017-06-09 22:52:28 -07:00
Saleem Abdulrasool
66a249ebdc vim: improve syntax highlighting for inout parameters
The `inout` keyword was not being recognised previously.  Recognise it
as a modifier for a type parameter.  It can only be used as a type
modifier.
2017-06-09 22:50:27 -07:00
Joe Shajrawi
0d0cac357a retain_value_addr and release_value_addr SIL instructions: take as an input an address, load the value inside it and call retain_value and release_value respectively 2017-04-30 10:23:55 -07:00
Saleem Abdulrasool
46ecc9a558 vim: add didSet willSet keywords 2017-04-17 21:08:08 -07:00
Arnold Schwaighofer
b167b4475d Add SIL and IRGen support for a ConstantStringLiteral instruction
This supports a utf8 or utf16 encoding.

rdar://30545013
2017-04-11 08:43:47 -07:00
Joe Shajrawi
33b0cf653f Rename unconditional_checked_cast_opaque to unconditional_checked_cast_value 2017-03-07 18:53:52 -08:00
Joe Shajrawi
1f626304f1 Add support for conditional checked cast instruction for opaque value types + SILGen support for it 2017-03-06 16:35:27 -08:00
Joe Shajrawi
16b6cb5e1d Support for deinit of opaque existentials: deinit_existential_opaque instruction + SILGen support 2017-02-27 14:46:43 -08:00
Joe Shajrawi
ec1e3ee20e Add support for unconditional checked cast instruction for opaque value types + SILGen support for it 2017-02-22 16:35:46 -08:00
Joe Shajrawi
1e521c453b Add support for Init Existentials for opaque value types 2017-02-20 16:40:02 -08:00
Joe Shajrawi
c478828de7 Support for Open Existentials that do no take an address 2017-02-09 11:25:34 -08:00
Saleem Abdulrasool
041bc95c0a vim: remove typealias from keywords
It is in the tyep definition list, do not treat it as a keyword.
2016-08-24 21:02:35 -07:00
Robert Widmann
4e5665a8bd [SE-0096] Remove support for dynamicType member 2016-07-30 03:24:05 -07:00
Dmitri Gribenko
ac489860a1 vim: add support for 'fileprivate' 2016-07-28 18:30:35 -07:00
Luke Larson
74e0498015 Revert "Update master to build with Xcode 8 beta 3, OS X 10.12, iOS 10, tvOS 10, and watchOS 3 SDKs."
This reverts commit 62d1fa760c.
2016-07-19 15:18:17 -07:00
Mishal Shah
62d1fa760c Update master to build with Xcode 8 beta 3, OS X 10.12, iOS 10, tvOS 10, and watchOS 3 SDKs. 2016-07-19 22:31:34 +02:00
Andrew Trick
2b732d0af5 Introduce Builtin.bindMemory and SIL bind_memory. (#3573)
Required for SE-0107: UnsafeRawPointer.
2016-07-18 13:18:03 -07:00
raimon
65ae9cc418 [vim] Support highlighting 'MARK' in comments 2016-07-13 22:00:52 +09:00
tokorom
f7867cedda [vim] highlight fallthrough 2016-06-05 15:15:08 +09:00
Saleem Abdulrasool
6e155f9dfd vim: highlight "indirect case" 2016-06-04 11:36:32 -07:00