readme
This commit is contained in:
		
							parent
							
								
									4ea80598b3
								
							
						
					
					
						commit
						894ef20cf5
					
				
					 1 changed files with 42 additions and 1 deletions
				
			
		
							
								
								
									
										41
									
								
								README.md
									
										
									
									
									
								
							
							
						
						
									
										41
									
								
								README.md
									
										
									
									
									
								
							|  | @ -1,3 +1,44 @@ | ||||||
| # GLOX | # GLOX | ||||||
| 
 | 
 | ||||||
| Lox interpreter written i Go. | Lox interpreter written i Go. | ||||||
|  | 
 | ||||||
|  | This is ongoing project where I try to recreate "JLOX" language in Go instead of Java. | ||||||
|  | It completly based on instructions from Bob Nystrom's book ["Crafting interpretters"](https://www.craftinginterpreters.com/). | ||||||
|  | 
 | ||||||
|  | Currently supported: | ||||||
|  | - REPL | ||||||
|  | - variables | ||||||
|  | - functions | ||||||
|  | - functions as values | ||||||
|  | - closures | ||||||
|  | - exceptions | ||||||
|  | - classes | ||||||
|  | - scoped blocks | ||||||
|  | - conditions | ||||||
|  | - loops | ||||||
|  | - basic arithmetic | ||||||
|  | - AST printing | ||||||
|  | - error recovery | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | TODO: | ||||||
|  | - Virtual Machine | ||||||
|  | - Intermediate representaion | ||||||
|  | 
 | ||||||
|  | ## Run | ||||||
|  | 
 | ||||||
|  | Simply compile and run binary. By default you will get REPL session. | ||||||
|  | ``` | ||||||
|  | go build | ||||||
|  | ./glox | ||||||
|  | > print 1 + 1; | ||||||
|  | ``` | ||||||
|  | 
 | ||||||
|  | If you want to run script - just pass script path as an argument: | ||||||
|  | ``` | ||||||
|  | go build | ||||||
|  | ./glox ./tests/functions.lox | ||||||
|  | ``` | ||||||
|  | 
 | ||||||
|  | ## Testing | ||||||
|  | TODO | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue