Advertisement
Guest User

WES_Lang

a guest
Jun 25th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Swift 4.02 KB | None | 0 0
  1. ?> Redfine the World Easy Syntax
  2. ?> Multiline Comment:
  3. ?>test
  4. !>
  5.     .. some Text
  6. <!
  7.  
  8. ?>SingellineComment:
  9. ?> .. some Text
  10.  
  11. ?>Data:
  12. ?>Number:
  13. i8
  14. i16
  15. i32
  16. i64
  17.  
  18. ?>Unsigend Number:
  19. ui8
  20. ui16
  21. ui32
  22. ui64
  23.  
  24. ?>Char:
  25. c8
  26. c16
  27. c32
  28. c64
  29.  
  30. ?>String:
  31. wrd
  32. str
  33. ?> Enumartion type
  34. enu
  35.  
  36. ?>Float:
  37. f8
  38. f16
  39. f32
  40. f64
  41.  
  42. ?> Special's
  43. type
  44.  
  45. ?>Var:
  46. var
  47. ct
  48. let
  49. const
  50.  
  51. ?> Alias Functions
  52. al this_thing i16
  53. al myfunc ifunc
  54. ?>Varide:
  55. i16,i32,i64:$t;
  56.  
  57. ?>Variade Data:
  58. var $t:beispiel
  59.  
  60. ?>Aliases
  61. al i16 int16;
  62. al f8 float8;
  63.  
  64. ?>Type Conversion
  65. var i16:data = 13343;
  66. var i32:data1 = conv(data);
  67.  
  68. ?> Get type of a Value
  69. var str:mydata = "this is a string";
  70. type:mydata ?> Will return str in version 1.0.0 of wes
  71.  
  72. ?>Function Definitions:
  73.  
  74. ?>SingelDefine:
  75. func:beispiel( .. Some Arguments )
  76. {
  77.     .. Some Commands
  78. }
  79.  
  80. ?>Anonym Define:
  81. ( .. Some Arguments )
  82. {
  83.     ?>.. Some Commands
  84. }
  85.  
  86. ?>AnonymFunction Calls:
  87.  ();
  88.  
  89. ?>AnonymFunction Store:
  90. var func:b =
  91. ( .. Some Agrguments )
  92. {
  93.     ?>.. Some Commands
  94. }
  95.  
  96. ?>Returning Functions:
  97. func:beispiel( .. Some Agruments ) str
  98. {
  99.     ?>.. Some Commands
  100. }
  101.  
  102. ?>Muliple Returning Functions:
  103. func:beispiel( .. Some Agruments ) str , i16
  104. {
  105.     ?>.. Some Commands
  106. }
  107.  
  108. ?>Variade Functions:
  109. i16,c16,str:$t;
  110. func:beispiel($t:beispiel1,$t:beispiel2)
  111. {
  112.     ret beispiel1 + beispiel2;
  113. }
  114.  
  115. ?>Variade Functions Return:
  116. func:beispiel($t:beispiel1 , $t:beispiel2) $t
  117. {
  118.     ret beispiel1 + beispiel2;
  119. }
  120.  
  121. ?>Functions with Names
  122. func:beispiel1(i16:x_pos,i16:y_pos)
  123. {
  124.     ?>.. some Commands
  125. }  
  126.  
  127. ?>Variade Function Calls:
  128. beispiel1(y_pos:55,x_pos:23);
  129.  
  130. ?>Functions with multi paramters
  131. func:beispiel4(i32:Dek,str)
  132. {
  133.  
  134. }
  135.  
  136. ?> Get type of function parameters taht are Varaides
  137. i16,i32,str:$t;
  138. str,i32,i64:$z;
  139.  
  140. func:bsp($t:param1,$z:param2)
  141. {
  142.     if type:param1 == str
  143.     {
  144.         if param2 == i16
  145.         {
  146.             print("this is param1: [param1] and param2: [param2]");
  147.         }
  148.     }
  149. }
  150.  
  151. bsp("simplecall",param2:23); ?> Will return: this is param1: simplecall and param2: 23
  152. bsp(param2:34,param1:max(i16)); ?> Will return: this is param1: 34 and param2: 65535
  153.  
  154. ?>Code Structures:
  155. ?>Wehn Statment (Multithread if):
  156. wehn a <= b
  157. {
  158.     ?>.. some Commands
  159. }
  160.  
  161. ?>If in wes lang
  162. if a <= b
  163. {
  164.     ?>.. some Commands
  165. }
  166.  
  167. ?>If + else
  168. if a <= b
  169. {
  170.     ?>.. some Commands
  171. }
  172. else
  173. {
  174.     ?>.. some Commands
  175. }
  176.  
  177. ?>if + elseif
  178. if a <= b
  179. {
  180.     ?>.. some Commands
  181. }
  182. elseif
  183. {
  184.     ?>.. some Commands
  185. }
  186.  
  187. ?>While Wes
  188.  
  189. while a < 3
  190. {
  191.     ?>.. some Commands
  192. }
  193.  
  194. ?>Mulitthread while
  195. aslong a < 3
  196. {
  197.     ?>.. some Commands
  198. }
  199.  
  200. ?>Mulitfile Stuff
  201. ?> File 1:
  202. func:ismir()
  203. {
  204.     ret 22;
  205. }
  206.  
  207. ?> File 2:
  208. print(ismir());
  209.  
  210. ?> Pointing Value
  211. var @test:mypointingvalue = ismir;
  212. mypointingvalue(); ?> 22
  213.  
  214. ?> Pointer as Parameter
  215. func:bc(@test:anvalue,@test2:mytest)
  216. {
  217.     print("Test"..anvalue.size);
  218. }
  219.  
  220. ?> Send Pointer
  221. var i16:zwei = 0;
  222. var i32:drei = 4;
  223. var c16:mychar = 23;
  224. bc(@zwei , @drei) ?> "Test 16bit "
  225. bc(@mychar , @tem ) ?> "Test 22bit "
  226.  
  227. ?> Summarys
  228. ct i16:MySum << 12 , 24 , 45 , 56 , 89 ;
  229. ct c32:MyRun << 'c' , 'o' , 'p' , 'w' ;
  230.  
  231. ?> Summary Read
  232. var MySum.type:val;
  233. MySum(23) = val;
  234.  
  235. ?> Summary Write
  236. MySum(12) = 4;
  237.  
  238. MySum:4 ?> 4 24 45 56 89
  239. MySum:5 ?> 4 5  45 56 89
  240. MySum: ?> 4 5 45 56 89
  241. MySum:1 ?> 1 5 45 56 89
  242.  
  243. MySum:! ?> 1 5 45 56 89
  244. MySum:4 ?> 1 4 45 56 89
  245.  
  246. ?> Summary Sort
  247. func:sort( a , b)
  248. {
  249.     wehn ( a < b )
  250.     {
  251.         ret a;
  252.     }
  253.     else
  254.     {
  255.         ret b;
  256.     }
  257. }
  258.  
  259. MySum(@sort:sort);
  260.  
  261. ?> Summary Sort Anoynom
  262. ()
  263. {
  264.     al a first;
  265.     al b second;
  266.     ret a < b ;
  267. }
  268.  
  269. MySum(@());
  270.  
  271. ?> Future
  272. ?> String Interpolation
  273. var i16:myrandomvar = 43423;
  274. var str:mystring = " [myrandomvar] "; ?> returns 43423
  275. var str:mystring2 = " [myrandomvar[HEX]] "; ?> returns 0xA99F
  276. var str:mystring3 = " [mystring2[ASCII]]"; ?> returns 43423
  277. var str:mystring4 = " [mystring2[RANGE 2-4]] "; ?> returns A99F
  278. var str:mystring5 = " [myrandomvar[PUT 1 3 4 5]] "; ?> returns 4423
  279. ?>diffrence ? the number 3 is missing
  280. var str:mystring6 = " [myrandomvar[EVERY 3]] "; ?> returns 442
  281.  
  282.  
  283.  
  284. ?> Classes Inharitance ..
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement