Closed johnfairh closed 1 year ago
I guess I will just keep going here for Swift 5.9:
Simple things:
package
macro
consuming
borrowing
each
consume
discard
~Copyable
type name - this is explicitly not a generic syntax (ie. for ~Fooable
) so it seems least bad to specialise this explicitly :/Swift 5.9 macros mean that users can define their own expression/function-type keywords that begin with ‘#’. So I’ve taken out the special cases of built-in #things
as we’ve done in the past for @things
. This looks good, highlights any arguments properly and improves the existing #available
to match @available
:
The special case for start-of-line is preserved to keep the 'preprocessor-like' parts different.
Great stuff. Thank you for the work here @johnfairh 🙇🏼 LGTM 🚀
Swift lexer updates for Swift 5.8 (and probably 5.7). First commit:
autoreleasepool
left
right
any
distributed
and#unavailable
#fileID
#filePath
directives$
symbolSecond commit is about regular expression literals which have some quirks due to being retrofitted to the language including:
#
delimiters which work like non-slash delims in other languages#
delims and always support extended syntax meaning #-end-of-line commentsThere are some corners I haven't captured including turning off extended syntax inside multi-line REs.
Final commit re-alphabetizes some keyword lists without trying to think too much about why the separate lists exist.