Skip to content
This repository has been archived by the owner on Mar 8, 2020. It is now read-only.

Commit

Permalink
update sdk version and add unicode fixture
Browse files Browse the repository at this point in the history
Signed-off-by: Denys Smirnov <denys@sourced.tech>
  • Loading branch information
Denys Smirnov authored and dennwc committed Apr 8, 2019
1 parent fc51832 commit 2bb4e7a
Show file tree
Hide file tree
Showing 5 changed files with 385 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions fixtures/unicode.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
auto a = "𝓏";
77 changes: 77 additions & 0 deletions fixtures/unicode.cpp.native
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{
IASTClass: "CPPASTTranslationUnit",
LocOffsetEnd: 14,
LocOffsetStart: 0,
'Prop_BuiltinMacroDefinitions': [],
'Prop_Declarations': [
{
IASTClass: "CPPASTSimpleDeclaration",
LocOffsetEnd: 14,
LocOffsetStart: 0,
'Prop_DeclSpecifier': {
IASTClass: "CPPASTSimpleDeclSpecifier",
IsComplex: false,
IsConst: false,
IsConstExpr: false,
IsExplicit: false,
IsFriend: false,
IsImaginary: false,
IsInline: false,
IsLong: false,
IsLongLong: false,
IsRestrict: false,
IsShort: false,
IsSigned: false,
IsThreadLocal: false,
IsUnsigned: false,
IsVirtual: false,
IsVolatile: false,
LocOffsetEnd: 4,
LocOffsetStart: 0,
StorageClass: "unspecified",
Type: "auto",
},
'Prop_Declarators': [
{
DeclaresParameterPack: false,
IASTClass: "CPPASTDeclarator",
LocOffsetEnd: 13,
LocOffsetStart: 5,
'Prop_Initializer': {
IASTClass: "CPPASTEqualsInitializer",
LocOffsetEnd: 13,
LocOffsetStart: 7,
'Prop_Expression': {
ExpressionType: "const char [3]",
ExpressionValueCategory: "LVALUE",
IASTClass: "CPPASTLiteralExpression",
IsLValue: true,
LiteralValue: "\"𝓏\"",
LocOffsetEnd: 13,
LocOffsetStart: 9,
kind: "string_literal",
},
'Prop_InitializerClause': {
ExpressionType: "const char [3]",
ExpressionValueCategory: "LVALUE",
IASTClass: "CPPASTLiteralExpression",
IsLValue: true,
LiteralValue: "\"𝓏\"",
LocOffsetEnd: 13,
LocOffsetStart: 9,
kind: "string_literal",
},
},
'Prop_Name': {
IASTClass: "CPPASTName",
LocOffsetEnd: 6,
LocOffsetStart: 5,
Name: "a",
},
'Prop_TypeNode': ~,
},
],
},
],
'Prop_PreprocStatements': [],
}
148 changes: 148 additions & 0 deletions fixtures/unicode.cpp.sem.uast
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
{ '@type': "cpp:CPPASTTranslationUnit",
'@role': [File, Module],
'@pos': { '@type': "uast:Positions",
start: { '@type': "uast:Position",
offset: 0,
line: 1,
col: 1,
},
end: { '@type': "uast:Position",
offset: 14,
line: 1,
col: 15,
},
},
'Prop_BuiltinMacroDefinitions': [],
'Prop_Declarations': [
{ '@type': "cpp:CPPASTSimpleDeclaration",
'@role': [Declaration, Statement],
'@pos': { '@type': "uast:Positions",
start: { '@type': "uast:Position",
offset: 0,
line: 1,
col: 1,
},
end: { '@type': "uast:Position",
offset: 14,
line: 1,
col: 15,
},
},
'Prop_DeclSpecifier': { '@type': "cpp:CPPASTSimpleDeclSpecifier",
'@token': "auto",
'@role': [Incomplete, Type],
'@pos': { '@type': "uast:Positions",
start: { '@type': "uast:Position",
offset: 0,
line: 1,
col: 1,
},
end: { '@type': "uast:Position",
offset: 4,
line: 1,
col: 5,
},
},
IsComplex: false,
IsConst: false,
IsConstExpr: false,
IsExplicit: false,
IsFriend: false,
IsImaginary: false,
IsInline: false,
IsLong: false,
IsLongLong: false,
IsRestrict: false,
IsShort: false,
IsSigned: false,
IsThreadLocal: false,
IsUnsigned: false,
IsVirtual: false,
IsVolatile: false,
StorageClass: "unspecified",
},
'Prop_Declarators': [
{ '@type': "cpp:CPPASTDeclarator",
'@role': [Declaration, Name, Variable],
'@pos': { '@type': "uast:Positions",
start: { '@type': "uast:Position",
offset: 5,
line: 1,
col: 6,
},
end: { '@type': "uast:Position",
offset: 13,
line: 1,
col: 14,
},
},
DeclaresParameterPack: false,
'Prop_Initializer': { '@type': "cpp:CPPASTEqualsInitializer",
'@role': [Assignment, Declaration, Expression, Right],
'@pos': { '@type': "uast:Positions",
start: { '@type': "uast:Position",
offset: 7,
line: 1,
col: 8,
},
end: { '@type': "uast:Position",
offset: 13,
line: 1,
col: 14,
},
},
'Prop_Expression': { '@type': "uast:String",
'@pos': { '@type': "uast:Positions",
start: { '@type': "uast:Position",
offset: 9,
line: 1,
col: 10,
},
end: { '@type': "uast:Position",
offset: 13,
line: 1,
col: 14,
},
},
Format: "",
Value: "𝓏",
},
'Prop_InitializerClause': { '@type': "uast:String",
'@pos': { '@type': "uast:Positions",
start: { '@type': "uast:Position",
offset: 9,
line: 1,
col: 10,
},
end: { '@type': "uast:Position",
offset: 13,
line: 1,
col: 14,
},
},
Format: "",
Value: "𝓏",
},
},
'Prop_Name': { '@type': "uast:Identifier",
'@pos': { '@type': "uast:Positions",
start: { '@type': "uast:Position",
offset: 5,
line: 1,
col: 6,
},
end: { '@type': "uast:Position",
offset: 6,
line: 1,
col: 7,
},
},
Name: "a",
},
'Prop_TypeNode': ~,
},
],
},
],
'Prop_PreprocStatements': [],
}
Loading

0 comments on commit 2bb4e7a

Please sign in to comment.