mirror of
				https://github.com/flynx/argv.js.git
				synced 2025-10-31 11:40:07 +00:00 
			
		
		
		
	minor tweaks + docs...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									d5d8c7a9bb
								
							
						
					
					
						commit
						87cd4abe96
					
				
							
								
								
									
										14
									
								
								argv.js
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								argv.js
									
									
									
									
									
								
							| @ -137,6 +137,12 @@ var afterCallback = function(name){ | |||||||
| // NOTE: essentially this parser is a very basic stack language...
 | // NOTE: essentially this parser is a very basic stack language...
 | ||||||
| // 		XXX can we implement the whole thing directly as a stack language???
 | // 		XXX can we implement the whole thing directly as a stack language???
 | ||||||
| //
 | //
 | ||||||
|  | // XXX might be a good idea to add a default .handler -- if a user does 
 | ||||||
|  | // 		not define a .handler just set a value... the question is on what?
 | ||||||
|  | // XXX might also be a good idea to return clone rather than this... i.e.
 | ||||||
|  | // 		treat the parser object as a result factory...
 | ||||||
|  | // 		...this would resolve any issues with misxing parse state with 
 | ||||||
|  | // 		grammer... etc.
 | ||||||
| // XXX handle option types???
 | // XXX handle option types???
 | ||||||
| // XXX --help should work for any command and not just for the nested 
 | // XXX --help should work for any command and not just for the nested 
 | ||||||
| // 		parser commands... (???)
 | // 		parser commands... (???)
 | ||||||
| @ -169,11 +175,11 @@ object.Constructor('Parser', { | |||||||
| 
 | 
 | ||||||
| 	// output...
 | 	// output...
 | ||||||
| 	// XXX is this the right way to go???
 | 	// XXX is this the right way to go???
 | ||||||
| 	print: function(){ | 	print: function(...args){ | ||||||
| 		console.log(...arguments) | 		console.log(...args) | ||||||
| 		return this }, | 		return this }, | ||||||
| 	printError: function(){ | 	printError: function(...args){ | ||||||
| 		console.error(...arguments) | 		console.error(...args) | ||||||
| 		return this }, | 		return this }, | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user