code.iteration.tokens.json 3.83 KB
{"type":"newline","line":2,"col":1}
{"type":"code","line":2,"col":1,"val":"var items = [1,2,3]","mustEscape":false,"buffer":false}
{"type":"newline","line":4,"col":1}
{"type":"tag","line":4,"col":1,"val":"ul"}
{"type":"indent","line":5,"col":1,"val":2}
{"type":"code","line":5,"col":3,"val":"items.forEach(function(item){","mustEscape":false,"buffer":false}
{"type":"indent","line":6,"col":1,"val":4}
{"type":"tag","line":6,"col":5,"val":"li"}
{"type":"code","line":6,"col":7,"val":"item","mustEscape":true,"buffer":true}
{"type":"outdent","line":7,"col":3}
{"type":"code","line":7,"col":3,"val":"})","mustEscape":false,"buffer":false}
{"type":"outdent","line":9,"col":1}
{"type":"code","line":9,"col":1,"val":"var items = [1,2,3]","mustEscape":false,"buffer":false}
{"type":"newline","line":11,"col":1}
{"type":"tag","line":11,"col":1,"val":"ul"}
{"type":"indent","line":12,"col":1,"val":2}
{"type":"each","line":12,"col":3,"val":"item","key":"i","code":"items"}
{"type":"indent","line":13,"col":1,"val":4}
{"type":"tag","line":13,"col":5,"val":"li"}
{"type":"start-attributes","line":13,"col":7}
{"type":"attribute","line":13,"col":8,"name":"class","val":"'item-' + i","mustEscape":true}
{"type":"end-attributes","line":13,"col":25}
{"type":"code","line":13,"col":26,"val":"item","mustEscape":true,"buffer":true}
{"type":"outdent","line":15,"col":3}
{"type":"outdent","line":15,"col":1}
{"type":"tag","line":15,"col":1,"val":"ul"}
{"type":"indent","line":16,"col":1,"val":2}
{"type":"each","line":16,"col":3,"val":"item","key":"i","code":"items"}
{"type":"indent","line":17,"col":1,"val":4}
{"type":"tag","line":17,"col":5,"val":"li"}
{"type":"code","line":17,"col":7,"val":"item","mustEscape":true,"buffer":true}
{"type":"outdent","line":19,"col":3}
{"type":"outdent","line":19,"col":1}
{"type":"tag","line":19,"col":1,"val":"ul"}
{"type":"indent","line":20,"col":1,"val":2}
{"type":"each","line":20,"col":3,"val":"$item","key":null,"code":"items"}
{"type":"indent","line":21,"col":1,"val":4}
{"type":"tag","line":21,"col":5,"val":"li"}
{"type":"code","line":21,"col":7,"val":"$item","mustEscape":true,"buffer":true}
{"type":"outdent","line":23,"col":3}
{"type":"outdent","line":23,"col":1}
{"type":"code","line":23,"col":1,"val":"var nums = [1, 2, 3]","mustEscape":false,"buffer":false}
{"type":"newline","line":24,"col":1}
{"type":"code","line":24,"col":1,"val":"var letters = ['a', 'b', 'c']","mustEscape":false,"buffer":false}
{"type":"newline","line":26,"col":1}
{"type":"tag","line":26,"col":1,"val":"ul"}
{"type":"indent","line":27,"col":1,"val":2}
{"type":"each","line":27,"col":3,"val":"l","key":null,"code":"letters"}
{"type":"indent","line":28,"col":1,"val":4}
{"type":"each","line":28,"col":5,"val":"n","key":null,"code":"nums"}
{"type":"indent","line":29,"col":1,"val":6}
{"type":"tag","line":29,"col":7,"val":"li"}
{"type":"interpolated-code","line":29,"col":10,"val":"n","mustEscape":true,"buffer":true}
{"type":"text","line":29,"col":14,"val":": "}
{"type":"interpolated-code","line":29,"col":16,"val":"l","mustEscape":true,"buffer":true}
{"type":"outdent","line":31,"col":5}
{"type":"outdent","line":31,"col":3}
{"type":"outdent","line":31,"col":1}
{"type":"code","line":31,"col":1,"val":"var count = 1","mustEscape":false,"buffer":false}
{"type":"newline","line":32,"col":1}
{"type":"code","line":32,"col":1,"val":"var counter = function() { return [count++, count++, count++] }","mustEscape":false,"buffer":false}
{"type":"newline","line":33,"col":1}
{"type":"tag","line":33,"col":1,"val":"ul"}
{"type":"indent","line":34,"col":1,"val":2}
{"type":"each","line":34,"col":3,"val":"n","key":null,"code":"counter()"}
{"type":"indent","line":35,"col":1,"val":4}
{"type":"tag","line":35,"col":5,"val":"li"}
{"type":"interpolated-code","line":35,"col":8,"val":"n","mustEscape":true,"buffer":true}
{"type":"outdent","line":36,"col":3}
{"type":"outdent","line":36,"col":1}
{"type":"eos","line":36,"col":1}