Adding range
This commit is contained in:
		
							
								
								
									
										9
									
								
								examples/lists.spf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								examples/lists.spf
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,9 @@ | ||||
| liste premier = [1, 2, 3]; | ||||
|  | ||||
| ajouter 4 dans premier; | ||||
|  | ||||
| liste deuxieme = [1:4]; | ||||
|  | ||||
| liste troisième = [deuxieme[0]: 10]; | ||||
|  | ||||
| liste quatrième = [1: troisième[6]]; | ||||
							
								
								
									
										2
									
								
								spf.lark
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								spf.lark
									
									
									
									
									
								
							| @ -55,7 +55,7 @@ loop: "tant" "que" expression "faire" "{" instruction_seq "}" -> while_loop | ||||
|  | ||||
| list: "[" expression? ("," expression)* "]"  | ||||
|  | ||||
| range: "[" expression? ":" expression? "]" | ||||
| range: "[" expression ":" expression "]" | ||||
|  | ||||
| controls: test | ||||
| 		| loop | ||||
|  | ||||
		Reference in New Issue
	
	Block a user