From 419407ef09adfad3a20c675c2eed949ded17f2d7 Mon Sep 17 00:00:00 2001 From: Denys Smirnov Date: Mon, 8 Apr 2019 23:09:28 +0300 Subject: [PATCH] update sdk version and add unicode fixture Signed-off-by: Denys Smirnov --- Gopkg.lock | 100 ++++++- fixtures/unicode.cs | 3 + fixtures/unicode.cs.native | 525 +++++++++++++++++++++++++++++++++++ fixtures/unicode.cs.sem.uast | 339 ++++++++++++++++++++++ fixtures/unicode.cs.uast | 389 ++++++++++++++++++++++++++ 5 files changed, 1353 insertions(+), 3 deletions(-) create mode 100644 fixtures/unicode.cs create mode 100644 fixtures/unicode.cs.native create mode 100644 fixtures/unicode.cs.sem.uast create mode 100644 fixtures/unicode.cs.uast diff --git a/Gopkg.lock b/Gopkg.lock index 663119f..b6239de 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -1,24 +1,63 @@ # This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. +[[projects]] + branch = "master" + name = "github.com/Azure/go-ansiterm" + packages = [ + ".", + "winterm" + ] + revision = "d6e3b3328b783f23731bc4d058875b0371ff8109" + [[projects]] name = "github.com/BurntSushi/toml" packages = ["."] revision = "b26d9c308763d68093482582cea63d69be07a0f0" version = "v0.3.0" +[[projects]] + name = "github.com/Microsoft/go-winio" + packages = ["."] + revision = "1a8911d1ed007260465c3bfbbc785ac6915a0bb8" + version = "v0.4.12" + +[[projects]] + branch = "master" + name = "github.com/Nvveen/Gotty" + packages = ["."] + revision = "cd527374f1e5bff4938207604a14f2e38a9cf512" + [[projects]] branch = "master" name = "github.com/codahale/hdrhistogram" packages = ["."] revision = "3a0bb77429bd3a61596f5e8a3172445844342120" +[[projects]] + branch = "master" + name = "github.com/containerd/continuity" + packages = ["pathdriver"] + revision = "004b46473808b3e7a4a3049c20e4376c91eb966d" + [[projects]] name = "github.com/davecgh/go-spew" packages = ["spew"] revision = "346938d642f2ec3594ed81d874461961cd0faa76" version = "v1.1.0" +[[projects]] + name = "github.com/docker/go-connections" + packages = ["nat"] + revision = "3ede32e2033de7505e6500d6c868c2b9ed9f169d" + version = "v0.3.0" + +[[projects]] + name = "github.com/docker/go-units" + packages = ["."] + revision = "47565b4f722fb6ceae66b95f853feed578a4a51c" + version = "v0.3.3" + [[projects]] name = "github.com/fatih/color" packages = ["."] @@ -79,6 +118,27 @@ packages = ["."] revision = "9520e82c474b0a04dd04f8a40959027271bab992" +[[projects]] + name = "github.com/opencontainers/go-digest" + packages = ["."] + revision = "279bed98673dd5bef374d3b6e4b09e2af76183bf" + version = "v1.0.0-rc1" + +[[projects]] + name = "github.com/opencontainers/image-spec" + packages = [ + "specs-go", + "specs-go/v1" + ] + revision = "d60099175f88c47cd379c4738d158884749ed235" + version = "v1.0.1" + +[[projects]] + name = "github.com/opencontainers/runc" + packages = ["libcontainer/user"] + revision = "69ae5da6afdcaaf38285a10b36f362e41cb298d6" + version = "v1.0.0-rc7" + [[projects]] name = "github.com/opentracing/opentracing-go" packages = [ @@ -89,6 +149,36 @@ revision = "1949ddbfd147afd4d964a9f00b24eb291e0e7c38" version = "v1.0.2" +[[projects]] + name = "github.com/ory/dockertest" + packages = [ + "docker", + "docker/opts", + "docker/pkg/archive", + "docker/pkg/fileutils", + "docker/pkg/homedir", + "docker/pkg/idtools", + "docker/pkg/ioutils", + "docker/pkg/jsonmessage", + "docker/pkg/longpath", + "docker/pkg/mount", + "docker/pkg/pools", + "docker/pkg/stdcopy", + "docker/pkg/system", + "docker/pkg/term", + "docker/pkg/term/windows", + "docker/types", + "docker/types/blkiodev", + "docker/types/container", + "docker/types/filters", + "docker/types/mount", + "docker/types/network", + "docker/types/registry", + "docker/types/strslice", + "docker/types/versions" + ] + revision = "1ff4d597ac09e84e6f3edfc340b22d5544da1eb2" + [[projects]] name = "github.com/pkg/errors" packages = ["."] @@ -254,6 +344,9 @@ [[projects]] name = "gopkg.in/bblfsh/sdk.v2" packages = [ + "assets/build", + "assets/skeleton", + "build", "cmd", "driver", "driver/errors", @@ -262,6 +355,7 @@ "driver/native", "driver/native/jsonlines", "driver/server", + "internal/docker", "protocol", "protocol/v1", "uast", @@ -274,8 +368,8 @@ "uast/viewer", "uast/yaml" ] - revision = "82ab50025f39a4d522a9124f69bd9cf5220ed6b9" - version = "v2.16.0" + revision = "a7cb6c25d2968d3f254149b7b878c4f5270dd1b6" + version = "v2.16.4" [[projects]] name = "gopkg.in/src-d/go-errors.v1" @@ -292,6 +386,6 @@ [solve-meta] analyzer-name = "dep" analyzer-version = 1 - inputs-digest = "94ce1d038c1ecc492376e41ccafcce31398e8c4b35b301c25f1f7f89720e0d75" + inputs-digest = "8009d9125f6601d7adb6a46ce785385833659a4bb0d3bf04fd206acf7b64c252" solver-name = "gps-cdcl" solver-version = 1 diff --git a/fixtures/unicode.cs b/fixtures/unicode.cs new file mode 100644 index 0000000..d247844 --- /dev/null +++ b/fixtures/unicode.cs @@ -0,0 +1,3 @@ +struct Teststruct1 { + string name = "𝓏"; +} \ No newline at end of file diff --git a/fixtures/unicode.cs.native b/fixtures/unicode.cs.native new file mode 100644 index 0000000..96aa581 --- /dev/null +++ b/fixtures/unicode.cs.native @@ -0,0 +1,525 @@ +{ '@type': "CompilationUnit", + AttributeLists: [], + EndOfFileToken: { '@type': "EndOfFileToken", + FullSpan: { '@type': "TextSpan", + End: 46, + IsEmpty: true, + Length: 0, + Start: 46, + }, + IsMissing: false, + LeadingTrivia: [], + Span: { '@type': "TextSpan", + End: 46, + IsEmpty: true, + Length: 0, + Start: 46, + }, + SpanStart: 46, + Text: "", + TrailingTrivia: [], + Value: "", + ValueText: "", + }, + Externs: [], + FullSpan: { '@type': "TextSpan", + End: 46, + IsEmpty: false, + Length: 46, + Start: 0, + }, + IsMissing: false, + IsStructuredTrivia: false, + Members: [ + { '@type': "StructDeclaration", + Arity: 0, + AttributeLists: [], + BaseList: ~, + CloseBraceToken: { '@type': "CloseBraceToken", + FullSpan: { '@type': "TextSpan", + End: 46, + IsEmpty: false, + Length: 1, + Start: 45, + }, + IsMissing: false, + LeadingTrivia: [], + Span: { '@type': "TextSpan", + End: 46, + IsEmpty: false, + Length: 1, + Start: 45, + }, + SpanStart: 45, + Text: "}", + TrailingTrivia: [], + Value: "}", + ValueText: "}", + }, + ConstraintClauses: [], + FullSpan: { '@type': "TextSpan", + End: 46, + IsEmpty: false, + Length: 46, + Start: 0, + }, + Identifier: { '@type': "IdentifierToken", + FullSpan: { '@type': "TextSpan", + End: 19, + IsEmpty: false, + Length: 12, + Start: 7, + }, + IsMissing: false, + LeadingTrivia: [], + Span: { '@type': "TextSpan", + End: 18, + IsEmpty: false, + Length: 11, + Start: 7, + }, + SpanStart: 7, + Text: "Teststruct1", + TrailingTrivia: [ + { '@type': "WhitespaceTrivia", + FullSpan: { '@type': "TextSpan", + End: 19, + IsEmpty: false, + Length: 1, + Start: 18, + }, + IsDirective: false, + Span: { '@type': "TextSpan", + End: 19, + IsEmpty: false, + Length: 1, + Start: 18, + }, + SpanStart: 18, + }, + ], + Value: "Teststruct1", + ValueText: "Teststruct1", + }, + IsMissing: false, + IsStructuredTrivia: false, + Keyword: { '@type': "StructKeyword", + FullSpan: { '@type': "TextSpan", + End: 7, + IsEmpty: false, + Length: 7, + Start: 0, + }, + IsMissing: false, + LeadingTrivia: [], + Span: { '@type': "TextSpan", + End: 6, + IsEmpty: false, + Length: 6, + Start: 0, + }, + SpanStart: 0, + Text: "struct", + TrailingTrivia: [ + { '@type': "WhitespaceTrivia", + FullSpan: { '@type': "TextSpan", + End: 7, + IsEmpty: false, + Length: 1, + Start: 6, + }, + IsDirective: false, + Span: { '@type': "TextSpan", + End: 7, + IsEmpty: false, + Length: 1, + Start: 6, + }, + SpanStart: 6, + }, + ], + Value: "struct", + ValueText: "struct", + }, + Members: [ + { '@type': "FieldDeclaration", + AttributeLists: [], + Declaration: { '@type': "VariableDeclaration", + FullSpan: { '@type': "TextSpan", + End: 43, + IsEmpty: false, + Length: 22, + Start: 21, + }, + IsMissing: false, + IsStructuredTrivia: false, + Span: { '@type': "TextSpan", + End: 43, + IsEmpty: false, + Length: 18, + Start: 25, + }, + SpanStart: 25, + Type: { '@type': "PredefinedType", + FullSpan: { '@type': "TextSpan", + End: 32, + IsEmpty: false, + Length: 11, + Start: 21, + }, + IsMissing: false, + IsStructuredTrivia: false, + IsUnmanaged: false, + IsVar: false, + Keyword: { '@type': "StringKeyword", + FullSpan: { '@type': "TextSpan", + End: 32, + IsEmpty: false, + Length: 11, + Start: 21, + }, + IsMissing: false, + LeadingTrivia: [ + { '@type': "WhitespaceTrivia", + FullSpan: { '@type': "TextSpan", + End: 25, + IsEmpty: false, + Length: 4, + Start: 21, + }, + IsDirective: false, + Span: { '@type': "TextSpan", + End: 25, + IsEmpty: false, + Length: 4, + Start: 21, + }, + SpanStart: 21, + }, + ], + Span: { '@type': "TextSpan", + End: 31, + IsEmpty: false, + Length: 6, + Start: 25, + }, + SpanStart: 25, + Text: "string", + TrailingTrivia: [ + { '@type': "WhitespaceTrivia", + FullSpan: { '@type': "TextSpan", + End: 32, + IsEmpty: false, + Length: 1, + Start: 31, + }, + IsDirective: false, + Span: { '@type': "TextSpan", + End: 32, + IsEmpty: false, + Length: 1, + Start: 31, + }, + SpanStart: 31, + }, + ], + Value: "string", + ValueText: "string", + }, + Span: { '@type': "TextSpan", + End: 31, + IsEmpty: false, + Length: 6, + Start: 25, + }, + SpanStart: 25, + }, + Variables: [ + { '@type': "VariableDeclarator", + ArgumentList: ~, + FullSpan: { '@type': "TextSpan", + End: 43, + IsEmpty: false, + Length: 11, + Start: 32, + }, + Identifier: { '@type': "IdentifierToken", + FullSpan: { '@type': "TextSpan", + End: 37, + IsEmpty: false, + Length: 5, + Start: 32, + }, + IsMissing: false, + LeadingTrivia: [], + Span: { '@type': "TextSpan", + End: 36, + IsEmpty: false, + Length: 4, + Start: 32, + }, + SpanStart: 32, + Text: "name", + TrailingTrivia: [ + { '@type': "WhitespaceTrivia", + FullSpan: { '@type': "TextSpan", + End: 37, + IsEmpty: false, + Length: 1, + Start: 36, + }, + IsDirective: false, + Span: { '@type': "TextSpan", + End: 37, + IsEmpty: false, + Length: 1, + Start: 36, + }, + SpanStart: 36, + }, + ], + Value: "name", + ValueText: "name", + }, + Initializer: { '@type': "EqualsValueClause", + EqualsToken: { '@type': "EqualsToken", + FullSpan: { '@type': "TextSpan", + End: 39, + IsEmpty: false, + Length: 2, + Start: 37, + }, + IsMissing: false, + LeadingTrivia: [], + Span: { '@type': "TextSpan", + End: 38, + IsEmpty: false, + Length: 1, + Start: 37, + }, + SpanStart: 37, + Text: "=", + TrailingTrivia: [ + { '@type': "WhitespaceTrivia", + FullSpan: { '@type': "TextSpan", + End: 39, + IsEmpty: false, + Length: 1, + Start: 38, + }, + IsDirective: false, + Span: { '@type': "TextSpan", + End: 39, + IsEmpty: false, + Length: 1, + Start: 38, + }, + SpanStart: 38, + }, + ], + Value: "=", + ValueText: "=", + }, + FullSpan: { '@type': "TextSpan", + End: 43, + IsEmpty: false, + Length: 6, + Start: 37, + }, + IsMissing: false, + IsStructuredTrivia: false, + Span: { '@type': "TextSpan", + End: 43, + IsEmpty: false, + Length: 6, + Start: 37, + }, + SpanStart: 37, + Value: { '@type': "StringLiteralExpression", + FullSpan: { '@type': "TextSpan", + End: 43, + IsEmpty: false, + Length: 4, + Start: 39, + }, + IsMissing: false, + IsStructuredTrivia: false, + Span: { '@type': "TextSpan", + End: 43, + IsEmpty: false, + Length: 4, + Start: 39, + }, + SpanStart: 39, + Token: { '@type': "StringLiteralToken", + FullSpan: { '@type': "TextSpan", + End: 43, + IsEmpty: false, + Length: 4, + Start: 39, + }, + IsMissing: false, + LeadingTrivia: [], + Span: { '@type': "TextSpan", + End: 43, + IsEmpty: false, + Length: 4, + Start: 39, + }, + SpanStart: 39, + Text: "\"𝓏\"", + TrailingTrivia: [], + Value: "𝓏", + ValueText: "𝓏", + }, + }, + }, + IsMissing: false, + IsStructuredTrivia: false, + Span: { '@type': "TextSpan", + End: 43, + IsEmpty: false, + Length: 11, + Start: 32, + }, + SpanStart: 32, + }, + ], + }, + FullSpan: { '@type': "TextSpan", + End: 45, + IsEmpty: false, + Length: 24, + Start: 21, + }, + IsMissing: false, + IsStructuredTrivia: false, + Modifiers: [], + SemicolonToken: { '@type': "SemicolonToken", + FullSpan: { '@type': "TextSpan", + End: 45, + IsEmpty: false, + Length: 2, + Start: 43, + }, + IsMissing: false, + LeadingTrivia: [], + Span: { '@type': "TextSpan", + End: 44, + IsEmpty: false, + Length: 1, + Start: 43, + }, + SpanStart: 43, + Text: ";", + TrailingTrivia: [ + { '@type': "EndOfLineTrivia", + FullSpan: { '@type': "TextSpan", + End: 45, + IsEmpty: false, + Length: 1, + Start: 44, + }, + IsDirective: false, + Span: { '@type': "TextSpan", + End: 45, + IsEmpty: false, + Length: 1, + Start: 44, + }, + SpanStart: 44, + }, + ], + Value: ";", + ValueText: ";", + }, + Span: { '@type': "TextSpan", + End: 44, + IsEmpty: false, + Length: 19, + Start: 25, + }, + SpanStart: 25, + }, + ], + Modifiers: [], + OpenBraceToken: { '@type': "OpenBraceToken", + FullSpan: { '@type': "TextSpan", + End: 21, + IsEmpty: false, + Length: 2, + Start: 19, + }, + IsMissing: false, + LeadingTrivia: [], + Span: { '@type': "TextSpan", + End: 20, + IsEmpty: false, + Length: 1, + Start: 19, + }, + SpanStart: 19, + Text: "{", + TrailingTrivia: [ + { '@type': "EndOfLineTrivia", + FullSpan: { '@type': "TextSpan", + End: 21, + IsEmpty: false, + Length: 1, + Start: 20, + }, + IsDirective: false, + Span: { '@type': "TextSpan", + End: 21, + IsEmpty: false, + Length: 1, + Start: 20, + }, + SpanStart: 20, + }, + ], + Value: "{", + ValueText: "{", + }, + SemicolonToken: { '@type': "None", + FullSpan: { '@type': "TextSpan", + End: 0, + IsEmpty: true, + Length: 0, + Start: 0, + }, + IsMissing: false, + LeadingTrivia: [], + Parent: ~, + Span: { '@type': "TextSpan", + End: 0, + IsEmpty: true, + Length: 0, + Start: 0, + }, + SpanStart: 0, + Text: "", + TrailingTrivia: [], + Value: ~, + ValueText: ~, + }, + Span: { '@type': "TextSpan", + End: 46, + IsEmpty: false, + Length: 46, + Start: 0, + }, + SpanStart: 0, + TypeParameterList: ~, + }, + ], + Parent: ~, + Span: { '@type': "TextSpan", + End: 46, + IsEmpty: false, + Length: 46, + Start: 0, + }, + SpanStart: 0, + Usings: [], +} \ No newline at end of file diff --git a/fixtures/unicode.cs.sem.uast b/fixtures/unicode.cs.sem.uast new file mode 100644 index 0000000..edddeb0 --- /dev/null +++ b/fixtures/unicode.cs.sem.uast @@ -0,0 +1,339 @@ +{ '@type': "csharp:CompilationUnit", + '@role': [File, Module], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 0, + line: 1, + col: 1, + }, + end: { '@type': "uast:Position", + offset: 46, + line: 2, + col: 26, + }, + }, + AttributeLists: [], + EndOfFileToken: { '@type': "csharp:EndOfFileToken", + '@role': [Incomplete, Noop], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 46, + line: 2, + col: 26, + }, + end: { '@type': "uast:Position", + offset: 46, + line: 2, + col: 26, + }, + }, + IsMissing: false, + Text: "", + Value: "", + ValueText: "", + }, + Externs: [], + IsMissing: false, + IsStructuredTrivia: false, + Members: [ + { '@type': "csharp:StructDeclaration", + '@role': [Declaration, Type], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 0, + line: 1, + col: 1, + }, + end: { '@type': "uast:Position", + offset: 46, + line: 2, + col: 26, + }, + }, + Arity: 0, + AttributeLists: [], + BaseList: ~, + CloseBraceToken: { '@type': "csharp:CloseBraceToken", + '@role': [Incomplete], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 45, + line: 2, + col: 25, + }, + end: { '@type': "uast:Position", + offset: 46, + line: 2, + col: 26, + }, + }, + IsMissing: false, + Text: "}", + Value: "}", + ValueText: "}", + }, + ConstraintClauses: [], + Identifier: { '@type': "uast:Identifier", + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 7, + line: 1, + col: 8, + }, + end: { '@type': "uast:Position", + offset: 18, + line: 1, + col: 19, + }, + }, + Name: "Teststruct1", + }, + IsMissing: false, + IsStructuredTrivia: false, + Keyword: { '@type': "csharp:StructKeyword", + '@token': "struct", + '@role': [Declaration, Type], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 0, + line: 1, + col: 1, + }, + end: { '@type': "uast:Position", + offset: 6, + line: 1, + col: 7, + }, + }, + IsMissing: false, + Text: "struct", + ValueText: "struct", + }, + Members: [ + { '@type': "csharp:FieldDeclaration", + '@role': [Declaration, Type, Variable], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 25, + line: 2, + col: 5, + }, + end: { '@type': "uast:Position", + offset: 44, + line: 2, + col: 24, + }, + }, + AttributeLists: [], + Declaration: { '@type': "csharp:VariableDeclaration", + '@role': [Declaration, Expression, Variable], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 25, + line: 2, + col: 5, + }, + end: { '@type': "uast:Position", + offset: 43, + line: 2, + col: 23, + }, + }, + IsMissing: false, + IsStructuredTrivia: false, + Type: { '@type': "csharp:PredefinedType", + '@role': [Incomplete, Primitive, Type], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 25, + line: 2, + col: 5, + }, + end: { '@type': "uast:Position", + offset: 31, + line: 2, + col: 11, + }, + }, + IsMissing: false, + IsStructuredTrivia: false, + IsUnmanaged: false, + IsVar: false, + Keyword: { '@type': "csharp:StringKeyword", + '@token': "string", + '@role': [Declaration, String], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 25, + line: 2, + col: 5, + }, + end: { '@type': "uast:Position", + offset: 31, + line: 2, + col: 11, + }, + }, + IsMissing: false, + Text: "string", + ValueText: "string", + }, + }, + Variables: [ + { '@type': "csharp:VariableDeclarator", + '@role': [Declaration, Right, Variable], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 32, + line: 2, + col: 12, + }, + end: { '@type': "uast:Position", + offset: 43, + line: 2, + col: 23, + }, + }, + ArgumentList: ~, + Identifier: { '@type': "uast:Identifier", + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 32, + line: 2, + col: 12, + }, + end: { '@type': "uast:Position", + offset: 36, + line: 2, + col: 16, + }, + }, + Name: "name", + }, + Initializer: { '@type': "csharp:EqualsValueClause", + '@role': [Assignment, Right], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 37, + line: 2, + col: 17, + }, + end: { '@type': "uast:Position", + offset: 43, + line: 2, + col: 23, + }, + }, + EqualsToken: { '@type': "csharp:EqualsToken", + '@role': [Equal, Operator], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 37, + line: 2, + col: 17, + }, + end: { '@type': "uast:Position", + offset: 38, + line: 2, + col: 18, + }, + }, + IsMissing: false, + Text: "=", + Value: "=", + ValueText: "=", + }, + IsMissing: false, + IsStructuredTrivia: false, + Value: { '@type': "uast:String", + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 39, + line: 2, + col: 19, + }, + end: { '@type': "uast:Position", + offset: 43, + line: 2, + col: 23, + }, + }, + Format: "", + Value: "𝓏", + }, + }, + IsMissing: false, + IsStructuredTrivia: false, + }, + ], + }, + IsMissing: false, + IsStructuredTrivia: false, + Modifiers: [], + SemicolonToken: { '@type': "csharp:SemicolonToken", + '@role': [Incomplete], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 43, + line: 2, + col: 23, + }, + end: { '@type': "uast:Position", + offset: 44, + line: 2, + col: 24, + }, + }, + IsMissing: false, + Text: ";", + Value: ";", + ValueText: ";", + }, + }, + ], + Modifiers: [], + OpenBraceToken: { '@type': "csharp:OpenBraceToken", + '@role': [Incomplete], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 19, + line: 1, + col: 20, + }, + end: { '@type': "uast:Position", + offset: 20, + line: 1, + col: 21, + }, + }, + IsMissing: false, + Text: "{", + Value: "{", + ValueText: "{", + }, + SemicolonToken: { '@type': "csharp:None", + '@role': [Incomplete], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 0, + line: 1, + col: 1, + }, + end: { '@type': "uast:Position", + offset: 0, + line: 1, + col: 1, + }, + }, + IsMissing: false, + Parent: ~, + Text: "", + Value: ~, + ValueText: ~, + }, + TypeParameterList: ~, + }, + ], + Parent: ~, + Usings: [], +} \ No newline at end of file diff --git a/fixtures/unicode.cs.uast b/fixtures/unicode.cs.uast new file mode 100644 index 0000000..7ada7bd --- /dev/null +++ b/fixtures/unicode.cs.uast @@ -0,0 +1,389 @@ +{ '@type': "CompilationUnit", + '@role': [File, Module], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 0, + line: 1, + col: 1, + }, + end: { '@type': "uast:Position", + offset: 46, + line: 2, + col: 26, + }, + }, + AttributeLists: [], + EndOfFileToken: { '@type': "EndOfFileToken", + '@role': [Incomplete, Noop], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 46, + line: 2, + col: 26, + }, + end: { '@type': "uast:Position", + offset: 46, + line: 2, + col: 26, + }, + }, + IsMissing: false, + LeadingTrivia: [], + Text: "", + TrailingTrivia: [], + Value: "", + ValueText: "", + }, + Externs: [], + IsMissing: false, + IsStructuredTrivia: false, + Members: [ + { '@type': "StructDeclaration", + '@role': [Declaration, Type], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 0, + line: 1, + col: 1, + }, + end: { '@type': "uast:Position", + offset: 46, + line: 2, + col: 26, + }, + }, + Arity: 0, + AttributeLists: [], + BaseList: ~, + CloseBraceToken: { '@type': "CloseBraceToken", + '@role': [Incomplete], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 45, + line: 2, + col: 25, + }, + end: { '@type': "uast:Position", + offset: 46, + line: 2, + col: 26, + }, + }, + IsMissing: false, + LeadingTrivia: [], + Text: "}", + TrailingTrivia: [], + Value: "}", + ValueText: "}", + }, + ConstraintClauses: [], + Identifier: { '@type': "IdentifierToken", + '@token': "Teststruct1", + '@role': [Expression, Identifier], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 7, + line: 1, + col: 8, + }, + end: { '@type': "uast:Position", + offset: 18, + line: 1, + col: 19, + }, + }, + IsMissing: false, + LeadingTrivia: [], + TrailingTrivia: [], + Value: "Teststruct1", + ValueText: "Teststruct1", + }, + IsMissing: false, + IsStructuredTrivia: false, + Keyword: { '@type': "StructKeyword", + '@token': "struct", + '@role': [Declaration, Type], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 0, + line: 1, + col: 1, + }, + end: { '@type': "uast:Position", + offset: 6, + line: 1, + col: 7, + }, + }, + IsMissing: false, + LeadingTrivia: [], + Text: "struct", + TrailingTrivia: [], + ValueText: "struct", + }, + Members: [ + { '@type': "FieldDeclaration", + '@role': [Declaration, Type, Variable], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 25, + line: 2, + col: 5, + }, + end: { '@type': "uast:Position", + offset: 44, + line: 2, + col: 24, + }, + }, + AttributeLists: [], + Declaration: { '@type': "VariableDeclaration", + '@role': [Declaration, Expression, Variable], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 25, + line: 2, + col: 5, + }, + end: { '@type': "uast:Position", + offset: 43, + line: 2, + col: 23, + }, + }, + IsMissing: false, + IsStructuredTrivia: false, + Type: { '@type': "PredefinedType", + '@role': [Incomplete, Primitive, Type], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 25, + line: 2, + col: 5, + }, + end: { '@type': "uast:Position", + offset: 31, + line: 2, + col: 11, + }, + }, + IsMissing: false, + IsStructuredTrivia: false, + IsUnmanaged: false, + IsVar: false, + Keyword: { '@type': "StringKeyword", + '@token': "string", + '@role': [Declaration, String], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 25, + line: 2, + col: 5, + }, + end: { '@type': "uast:Position", + offset: 31, + line: 2, + col: 11, + }, + }, + IsMissing: false, + LeadingTrivia: [], + Text: "string", + TrailingTrivia: [], + ValueText: "string", + }, + }, + Variables: [ + { '@type': "VariableDeclarator", + '@role': [Declaration, Right, Variable], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 32, + line: 2, + col: 12, + }, + end: { '@type': "uast:Position", + offset: 43, + line: 2, + col: 23, + }, + }, + ArgumentList: ~, + Identifier: { '@type': "IdentifierToken", + '@token': "name", + '@role': [Expression, Identifier], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 32, + line: 2, + col: 12, + }, + end: { '@type': "uast:Position", + offset: 36, + line: 2, + col: 16, + }, + }, + IsMissing: false, + LeadingTrivia: [], + TrailingTrivia: [], + Value: "name", + ValueText: "name", + }, + Initializer: { '@type': "EqualsValueClause", + '@role': [Assignment, Right], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 37, + line: 2, + col: 17, + }, + end: { '@type': "uast:Position", + offset: 43, + line: 2, + col: 23, + }, + }, + EqualsToken: { '@type': "EqualsToken", + '@role': [Equal, Operator], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 37, + line: 2, + col: 17, + }, + end: { '@type': "uast:Position", + offset: 38, + line: 2, + col: 18, + }, + }, + IsMissing: false, + LeadingTrivia: [], + Text: "=", + TrailingTrivia: [], + Value: "=", + ValueText: "=", + }, + IsMissing: false, + IsStructuredTrivia: false, + Value: { '@type': "StringLiteralExpression", + '@role': [Expression, Literal, String], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 39, + line: 2, + col: 19, + }, + end: { '@type': "uast:Position", + offset: 43, + line: 2, + col: 23, + }, + }, + IsMissing: false, + IsStructuredTrivia: false, + Token: { '@type': "StringLiteralToken", + '@role': [Literal, String], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 39, + line: 2, + col: 19, + }, + end: { '@type': "uast:Position", + offset: 43, + line: 2, + col: 23, + }, + }, + IsMissing: false, + LeadingTrivia: [], + Text: "\"𝓏\"", + TrailingTrivia: [], + Value: "𝓏", + ValueText: "𝓏", + }, + }, + }, + IsMissing: false, + IsStructuredTrivia: false, + }, + ], + }, + IsMissing: false, + IsStructuredTrivia: false, + Modifiers: [], + SemicolonToken: { '@type': "SemicolonToken", + '@role': [Incomplete], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 43, + line: 2, + col: 23, + }, + end: { '@type': "uast:Position", + offset: 44, + line: 2, + col: 24, + }, + }, + IsMissing: false, + LeadingTrivia: [], + Text: ";", + TrailingTrivia: [], + Value: ";", + ValueText: ";", + }, + }, + ], + Modifiers: [], + OpenBraceToken: { '@type': "OpenBraceToken", + '@role': [Incomplete], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 19, + line: 1, + col: 20, + }, + end: { '@type': "uast:Position", + offset: 20, + line: 1, + col: 21, + }, + }, + IsMissing: false, + LeadingTrivia: [], + Text: "{", + TrailingTrivia: [], + Value: "{", + ValueText: "{", + }, + SemicolonToken: { '@type': "None", + '@role': [Incomplete], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 0, + line: 1, + col: 1, + }, + end: { '@type': "uast:Position", + offset: 0, + line: 1, + col: 1, + }, + }, + IsMissing: false, + LeadingTrivia: [], + Parent: ~, + Text: "", + TrailingTrivia: [], + Value: ~, + ValueText: ~, + }, + TypeParameterList: ~, + }, + ], + Parent: ~, + Usings: [], +} \ No newline at end of file