parser: minor syntax fix
							parent
							
								
									a29c80ca3d
								
							
						
					
					
						commit
						fdfa564865
					
				| 
						 | 
					@ -531,10 +531,7 @@ fn (p mut Parser) const_decl() {
 | 
				
			||||||
			p.table.register_const(name, typ, p.mod)
 | 
								p.table.register_const(name, typ, p.mod)
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		// Check to see if this constant exists, and is void. If so, try and get the type again:
 | 
							// Check to see if this constant exists, and is void. If so, try and get the type again:
 | 
				
			||||||
		for { // TODO: Find out how the error handling, and use it here instead of the for/break hack...
 | 
							if my_const := p.v.table.find_const(name) {
 | 
				
			||||||
			my_const := p.v.table.find_const(name) or {
 | 
					 | 
				
			||||||
				break
 | 
					 | 
				
			||||||
			} 
 | 
					 | 
				
			||||||
			if my_const.typ == 'void' {
 | 
								if my_const.typ == 'void' {
 | 
				
			||||||
				for i, v in p.v.table.consts {
 | 
									for i, v in p.v.table.consts {
 | 
				
			||||||
					if v.name == name {
 | 
										if v.name == name {
 | 
				
			||||||
| 
						 | 
					@ -543,7 +540,6 @@ fn (p mut Parser) const_decl() {
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			break
 | 
					 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		if p.pass == .main && !p.cgen.nogen {
 | 
							if p.pass == .main && !p.cgen.nogen {
 | 
				
			||||||
			// TODO hack
 | 
								// TODO hack
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue