Slide 18
Slide 18 text
PARSEͷྲྀΕ
“{status: 200, users: [a, b] }”
{ ͱ
status: ͱ
200 ͱ
, ͱ
users: ͱ
[ ͱ
aͱ
, ͱ
b ͱ
] ͱ
}
Tokenize
จࣈྻ
Tokens
ASTߏங
%p({status: 200, users: [a, b] }) =~ {status: 200, users: [1, 3] }
AST
Variable
Node (b)
val:Array
Node
Variable
Node (a)
Hash
Node
val:
Integer
Node (200)
key: Symbol
Node
(:status)
key: Symbol
Node
(:users)