Skip to content

Instantly share code, notes, and snippets.

@anderseknert
Created September 22, 2022 12:37
Show Gist options
  • Save anderseknert/d2aec51b950362e156bb413ad312fca3 to your computer and use it in GitHub Desktop.
Save anderseknert/d2aec51b950362e156bb413ad312fca3 to your computer and use it in GitHub Desktop.
Funcs
{
"funcs": {
"funcs": [
{
"name": "g0.data.policy.is_admin",
"params": [
0,
1
],
"return": 2,
"blocks": [
{
"stmts": [
{
"type": "ResetLocalStmt",
"stmt": {
"target": 3,
"file": 0,
"col": 1,
"row": 8
}
},
{
"type": "DotStmt",
"stmt": {
"source": {
"type": "local",
"value": 0
},
"key": {
"type": "string_index",
"value": 1
},
"target": 4,
"file": 0,
"col": 24,
"row": 8
}
},
{
"type": "DotStmt",
"stmt": {
"source": {
"type": "local",
"value": 4
},
"key": {
"type": "string_index",
"value": 2
},
"target": 5,
"file": 0,
"col": 24,
"row": 8
}
},
{
"type": "AssignVarStmt",
"stmt": {
"source": {
"type": "local",
"value": 5
},
"target": 6,
"file": 0,
"col": 24,
"row": 8
}
},
{
"type": "CallStmt",
"stmt": {
"func": "internal.member_2",
"args": [
{
"type": "string_index",
"value": 3
},
{
"type": "local",
"value": 6
}
],
"result": 7,
"file": 0,
"col": 13,
"row": 8
}
},
{
"type": "NotEqualStmt",
"stmt": {
"a": {
"type": "local",
"value": 7
},
"b": {
"type": "bool",
"value": false
},
"file": 0,
"col": 13,
"row": 8
}
},
{
"type": "AssignVarOnceStmt",
"stmt": {
"source": {
"type": "bool",
"value": true
},
"target": 3,
"file": 0,
"col": 1,
"row": 8
}
}
]
},
{
"stmts": [
{
"type": "IsDefinedStmt",
"stmt": {
"source": 3,
"file": 0,
"col": 1,
"row": 8
}
},
{
"type": "AssignVarOnceStmt",
"stmt": {
"source": {
"type": "local",
"value": 3
},
"target": 2,
"file": 0,
"col": 1,
"row": 8
}
}
]
},
{
"stmts": [
{
"type": "ReturnLocalStmt",
"stmt": {
"source": 2,
"file": 0,
"col": 1,
"row": 8
}
}
]
}
],
"path": [
"g0",
"policy",
"is_admin"
]
},
{
"name": "g0.data.policy.allow",
"params": [
0,
1
],
"return": 2,
"blocks": [
{
"stmts": [
{
"type": "ResetLocalStmt",
"stmt": {
"target": 3,
"file": 0,
"col": 1,
"row": 6
}
},
{
"type": "CallStmt",
"stmt": {
"func": "g0.data.policy.is_admin",
"args": [
{
"type": "local",
"value": 0
},
{
"type": "local",
"value": 1
}
],
"result": 4,
"file": 0,
"col": 10,
"row": 6
}
},
{
"type": "NotEqualStmt",
"stmt": {
"a": {
"type": "local",
"value": 4
},
"b": {
"type": "bool",
"value": false
},
"file": 0,
"col": 10,
"row": 6
}
},
{
"type": "AssignVarOnceStmt",
"stmt": {
"source": {
"type": "bool",
"value": true
},
"target": 3,
"file": 0,
"col": 1,
"row": 6
}
}
]
},
{
"stmts": [
{
"type": "IsDefinedStmt",
"stmt": {
"source": 3,
"file": 0,
"col": 1,
"row": 6
}
},
{
"type": "AssignVarOnceStmt",
"stmt": {
"source": {
"type": "local",
"value": 3
},
"target": 2,
"file": 0,
"col": 1,
"row": 6
}
}
]
},
{
"stmts": [
{
"type": "ReturnLocalStmt",
"stmt": {
"source": 2,
"file": 0,
"col": 1,
"row": 6
}
}
]
}
],
"path": [
"g0",
"policy",
"allow"
]
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment