main.yase 6.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. yase 1.0
  2. #builtin
  3. 1=(:eSeq,2)
  4. 2=(:godPanel,1,(:a,(:s,(:stdWriteFile,(:s;main.yase),(:stdSerializeNode,(:stdPass,1))),(:s;save);S),3,(:s,(:eIfStmt,(:eIf,(:stdLessInt,4,(:i;\1\f)),(:stdSetData,4,(:stdLen,(5)))),(:eElse,(13,4,(:i;ÿÿÿÿÿÿÿÿ)))),(:s;move up);w),(:s,(:eIfStmt,(:eIf,(:stdLessInt,(:stdLen,(5)),(:stdSumInt,4,(:i;\1\f))),(:stdSetData,4,(:i;\g))),(:eElse,(13,4))),(:s;move down);s),(:s,(:eSeq,(:eWhile,(23,(:stdLessInt,(:i;\g),25),(:stdLessInt,(:stdLen,33),(:i;\1\f))),(:stdDelete,(26),(:stdSumInt,25,(:i;ÿÿÿÿÿÿÿÿ)))),(:eIfStmt,(:eIf,(:stdLessInt,25,(:i;\1\f)),21),(:eElse,(:eSeq,(37,40),(:stdInsert,40,(:i;\g),(:stdGet,33)),(:stdSetData,4,33),(:stdDelete,41,(:stdSumInt,(:stdLen,41),(:i;ÿÿÿÿÿÿÿÿ))),(:eIfStmt,(:eIf,(:stdLessInt,4,(:i;\g)),(:stdSetData,4,(:i;\g))),(:eIf,(:stdLessInt,42,4),(:stdSetData,4,42))))))),(:s;move to parent);a),(:s,(:eIfStmt,43,44,(:eElse,(:eSeq,(:stdInsert,45,(:stdLen,45),(:stdCopyNode,4)),(:stdInsert,(34,(26)),(:i;\g),(5)),(:stdInsert,40,(:i;\1\f),(46)),(:stdDelete,40,(:i;\g)),(:stdSetData,4,(:i;\g))))),(:s;move to child);d),3,(:s,(:eSeq,(:stdInsert,(5),4,(49)),(13,4)),(:s;insert child from buffer);i),(:s,(:eIfStmt,43,44,(:eElse,(:eSeq,(:stdDelete,(5),(:stdSumInt,4,(:i;ÿÿÿÿÿÿÿÿ))),(13,4,(:i;ÿÿÿÿÿÿÿÿ))))),(:s;delete child);D),(:s,(:eIfStmt,(:eIf,(:stdIdentity,(52,59,60),21),21),(:eElse,61)),(:s;move node up);[),(:s,(:eIfStmt,(:eIf,(:stdIdentity,(62,59,60),21),21),(:eElse,(:stdSetData,4,(:stdSumInt,4,(:i;\1\f))))),(:s;move node down);]),(:s,(:eIfStmt,64,(:eElse,(:eSeq,(65,70),(:stdDelete,71,72),61))),(:s;pop node);p),3,(:s,(65,73),(:s;copy selected node to buffer);b),(:s,(65,(:stdEval,73)),(:s;eval selected node to buffer);e),(:s,(65,(:stdKind,(46))),(:s;copy kind of selected node to buffer);K),3,(:s,(74),(:s;new node),74,81;n),(:s,(65,(:stdReadLine)),(:s;input string to buffer);"),(:s,(65,(:stdParseInt,(:stdReadLine))),(:s;read int to buffer);I),3,(:s,(:stdSetKind,(46),(49)),(:s;set kind);k),(:s,(:stdSetData,(46),(49)),(:s;set data);r),(:s,(:eIfStmt,64,(:eElse,(:eSeq,(:stdInsert,71,4,(:stdCopyNode,70)),(:stdDelete,71,72)))),(:s;unlink node);l)),(:s,9,4,51,28;god panel variables),29,(30,2,(:s;main.yase),(32,(11,2,(:s;root)))),(:s,7,78,6,79;node kind kinds),(:s,:s,:i;value kinds),77,(:s,(:nk,(:s;Int),(79,(:s;stores <word> bytes in data\, represented as type like int in nim or isize in rust))),(:nk,(:s;String),(79,(:s;stores text in utf-8 format in data))),(:nk,(:s;Node),(79,(:s;a node))),(:nk,(:s;Varargs),(79,(:s;variable arguments count of same type)));types),82,(:s,21;constants),:egStack,(:eSeq,(:s;goodbye\, world),(:s;hello\, world),(34,(:stdPass,82))))
  5. 3=(:s,(:s;do nothing\, it just for make whitespace in help))
  6. 4=(:i;\2\f)
  7. 5=(:nk,(:s;current node),(6,8),8)
  8. 6=(:nk,(:s;evalable),(7))
  9. 7=(:nk,(:s;node kind kind),(7))
  10. 8=(:stdGet,(:stdPass,9))
  11. 9=(:s,10;current node)
  12. 10=(11,:nk,12)
  13. 11=(:nk,(:s;module export))
  14. 12=(:s;node kind)
  15. 13=(:nk,(:s;inc),(6,14),14)
  16. 14=(:eIfStmt,(:eIf,(:stdLessInt,15,(:i;\1\f)),21),(:eElse,(:stdSetData,22,(:stdSumInt,22,(:eIfStmt,(:eIf,(:stdLessInt,15,(:i;\2\f)),(:i;\1\f)),(:eElse,(16,(:i;\1\f))))))))
  17. 15=(:eLet,(:stdLen,(16)))
  18. 16=(:nk,(:s;x),(6,17),17)
  19. 17=(:eIfStmt,(:eIf,(:stdDataEquals,(:stdLen,18),(:i;\g)),20),(:eElse,(:stdGet,20,(:stdEval,(:stdGet,18)))))
  20. 18=(:eLet,(:stdGet,19,(:stdSumInt,(:stdLen,19),(:i;ÿÿÿÿÿÿÿÿ))))
  21. 19=(:stdPass,:egStack)
  22. 20=(:stdGet,19,(:stdSumInt,(:stdLen,19),(:i;þÿÿÿÿÿÿÿ)))
  23. 21=(:s;no effect)
  24. 22=(:eLet,(16,(:i;\g)))
  25. 23=(:nk,(:s;and),(6,24),24)
  26. 24=(:eIfStmt,(:eIf,(:stdLessInt,(:stdLen,(16)),(:i;\2\f)),(:e,:erIllformedAst,23)),(:eIf,(16,(:i;\g)),(16,(:i;\1\f))),(:eElse,:f))
  27. 25=(:stdLen,(26))
  28. 26=(:nk,(:s;path),(6,27),27)
  29. 27=(:stdPass,28)
  30. 28=(:s,(:i,1;\1\f),(:i,2;\4\f),(:i,29;\3\f),(:i,31;\1\f);path)
  31. 29=(30,(:a),(:s;std),31)
  32. 30=(:nk,(:s;module))
  33. 31=(32,10)
  34. 32=(:nk,(:s;module exports))
  35. 33=(34,(26))
  36. 34=(:nk,(:s;last),(6,35),35,(:s;todo\: use let))
  37. 35=(:stdGet,36,(:stdSumInt,(:stdLen,36),(:i;ÿÿÿÿÿÿÿÿ)))
  38. 36=(16,(:i;\g))
  39. 37=(:nk,(:s;clear),(6,38),38)
  40. 38=(:eIfStmt,(:eIf,(:stdLessInt,(:stdLen,(16)),(:i;\1\f)),21),(:eElse,(:eWhile,(:stdLessInt,(:i;\g),(:stdLen,39)),(:stdDelete,39,(:i;\g)))))
  41. 39=(:eLet,(16,(:i;\g)))
  42. 40=(:stdPass,9)
  43. 41=(26)
  44. 42=(:stdLen,(5))
  45. 43=(:eIf,(:stdLessInt,4,(:i;\1\f)),21)
  46. 44=(:eIf,(:stdLessInt,(:stdLen,(5)),4),21)
  47. 45=(26)
  48. 46=(:nk,(:s;selected node),(6,47),47)
  49. 47=(:eIfStmt,(:eIf,(:stdLessInt,4,(:i;\1\f)),48),(:eIf,(:stdLessInt,(:stdLen,48),4),48),(:eElse,(:stdGet,48,(:stdSumInt,4,(:i;ÿÿÿÿÿÿÿÿ)))))
  50. 48=(5)
  51. 49=(:nk,(:s;buffer),(6,50),50)
  52. 50=(:stdGet,(:stdPass,51))
  53. 51=(:s,12;buffer)
  54. 52=(:nk,(:s;move up),(6,53),53)
  55. 53=(:eIfStmt,(:eIf,(:stdLessInt,54,(:i;\1\f)),21),(:eIf,(:stdLessInt,55,57),21),(:eElse,(:eSeq,(:stdInsert,56,57,58),(:stdDelete,56,(:stdSumInt,54,(:i;\1\f))))))
  56. 54=(:eLet,(16,(:i;\1\f)))
  57. 55=(:stdLen,56)
  58. 56=(:eLet,(16,(:i;\g)))
  59. 57=(:stdSumInt,54,(:i;ÿÿÿÿÿÿÿÿ))
  60. 58=(:stdGet,56,54)
  61. 59=(:stdGet,(:stdPass,9))
  62. 60=(:stdSumInt,4,(:i;ÿÿÿÿÿÿÿÿ))
  63. 61=(:stdSetData,4,60)
  64. 62=(:nk,(:s;move down),(6,63),63)
  65. 63=(:eIfStmt,(:eIf,(:stdLessInt,54,(:i;\g)),21),(:eIf,(:stdLessInt,55,(:stdSumInt,54,(:i;þÿÿÿÿÿÿÿ))),21),(:eElse,(:eSeq,(:stdInsert,56,(:stdSumInt,54,(:i;\2\f)),58),(:stdDelete,56,54))))
  66. 64=(:eIf,(:stdLessInt,4,(:i;\1\f)),21)
  67. 65=(:nk,(:s;set buffer),(6,66),66)
  68. 66=(:eSeq,(37,67),(:eWhile,(:stdLessInt,68,(:stdLen,69)),(:stdInsert,67,68,(:stdGet,69,68))))
  69. 67=(:stdPass,51)
  70. 68=(:stdLen,67)
  71. 69=(:eLet,(16))
  72. 70=(:stdGet,71,72)
  73. 71=(:stdGet,(:stdPass,9))
  74. 72=(:stdSumInt,4,(:i;ÿÿÿÿÿÿÿÿ))
  75. 73=(46)
  76. 74=(:nk,(:s;\(lambda\) new node),(6,75),75)
  77. 75=(:eIfStmt,(:eIf,(:stdDataEquals,76,(:i;ÿÿÿÿÿÿÿÿ)),21),(:eElse,(:eSeq,(:stdDelete,80,(:i;\g)),(:stdInsert,80,(:i;\g),(:stdCopyNode,81)),(:stdSetKind,(:stdGet,80),(:stdGet,(:stdPass,77),76)))))
  78. 76=(:eLet,(:stdAskSelect,(:stdPass,77),(:nk,(:s;\(lambda\) x[0]),:tNone,(:stdGet,(:stdEval,(16,(:i;\g)))))))
  79. 77=(:s,:a,:nk,:e,:eSeq,:eIfStmt,:eIf,:eElse,:eWhile,:eLet,:eLetLookup,:stdSumInt,:stdLessInt,:stdDataEquals,:stdSetData,:stdPass,:stdEval,:stdInsert,:stdDelete,:stdGet,:stdLen,:stdKind,:stdIdentity,:stdCopyNode,:stdSetKind,:stdAskSelect,:godPanel,:stdReadLine,:stdEcho,:stdDataLen,:stdDataGet,:stdDataInsert,:stdDataDelete,:stdParseInt,:stdFormatInt,:stdIntToByte,:stdByteToInt,:stdWriteFile,:stdReadFile,:stdSerializeNode,:stdDeserializeNode,7,78,6,79,52,62,34,49,5,46,26,65,37,13,23,16,30,(:nk,(:s;module imports)),(:nk,(:s;module import)),32,11;node kinds)
  80. 78=(:nk,(:s;value),(7))
  81. 79=(:nk,(:s;type),(7))
  82. 80=(:stdPass,51)
  83. 81=(:a)
  84. 82=(:s,:tNone,:tString,:tInt,:n,:t,:f,:erIllformedAst,:erIndex,:erType,:erParse,:erOs;builtin constants)
  85. =root=1