-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start threading the source position ...
... from macros to compiler-plugin via hints. Only for interfaces and operations for now
- Loading branch information
Showing
7 changed files
with
132 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
modules/core/shared/src/main/resources/META-INF/smithy/internals.smithy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
$version: "2" | ||
|
||
namespace smithy4s.deriving.internals | ||
|
||
@trait() | ||
structure SourcePosition { | ||
@required | ||
path: String | ||
@required | ||
start: Integer | ||
@required | ||
startLine: Integer | ||
@required | ||
startColumn: Integer | ||
@required | ||
end: Integer | ||
@required | ||
endLine: Integer | ||
@required | ||
endColumn: Integer | ||
} |
1 change: 1 addition & 0 deletions
1
modules/core/shared/src/main/resources/META-INF/smithy/manifest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
internals.smithy |
21 changes: 21 additions & 0 deletions
21
modules/core/shared/src/main/scala/smithy4s/deriving/internals/SourcePosition.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package smithy4s.deriving.internals | ||
|
||
import smithy4s.deriving.{*, given} | ||
import smithy4s.schema.Schema | ||
import smithy4s.ShapeTag | ||
import smithy4s.ShapeId | ||
|
||
case class SourcePosition( | ||
path: String, | ||
start: Int, | ||
startLine: Int, | ||
startColumn: Int, | ||
end: Int, | ||
endLine: Int, | ||
endColumn: Int | ||
) derives Schema | ||
|
||
object SourcePosition extends ShapeTag.Companion[SourcePosition] { | ||
val id: ShapeId = ShapeId("smithy4s.deriving.internals", "SourcePosition") | ||
def schema: Schema[SourcePosition] = derived$Schema | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters