Files
swift-mirror/test/SourceKit/SyntaxMapData/Inputs/syntaxmap.swift
Ben Langmuir 8030d44826 [SyntaxMap] Fold unary minus into numeric literals
Unlike other prefix operators, unary minus is folded into the
NumberLiteralExpr in the parser. This commit recreates this effect in
the lexer-based syntax map so that token ranges will include the leading
minus.

rdar://problem/20205885
2016-03-15 10:40:52 -07:00

52 lines
859 B
Swift

// This is a comment.
// This is a comment that contradicts the previous comment.
class Foo {
var test : Int
var a, b : Int
}
#if CONF
var g : Int
#else
var g : Float
#endif
// Something. FIXME: Blah.
// Something http://www.apple.com something else
//http://www.apple.com
// http://www.apple.com
var str = "some string \(0)"
func <#test1#>() {}
/// Brief description.
///
/// Some words.
///
/// - Parameters:
/// - x: ...
/// - z
/// - Notafield: THISISNOTAFIELD
///
/// - parameter y: A number
/// - returns: `x + y`
func foo(x: Int, y: Int) -> Int { return x + y }
/**
- note: NOTENOTENOTE
- warning: WARNWARNWARN
- returns nothing
- RETURNS: Void
- requires: List items to be at the top level
*/
func bar() {}
// mailto:awesomeguy@apple.com
// radar:1234567
// mailto:thisisnotmail
// unknownprotocol://awesomeguy.com
_ = -123