New dedicated priority for binary operators between relational and sum ones
This commit is contained in:
		
							parent
							
								
									6211be8a8f
								
							
						
					
					
						commit
						edf8818f51
					
				@ -11,7 +11,7 @@ func newBinNotTerm(tk *Token) (inst *term) {
 | 
				
			|||||||
		tk:       *tk,
 | 
							tk:       *tk,
 | 
				
			||||||
		children: make([]*term, 0, 1),
 | 
							children: make([]*term, 0, 1),
 | 
				
			||||||
		position: posPrefix,
 | 
							position: posPrefix,
 | 
				
			||||||
		priority: priNot,
 | 
							priority: priBinary,
 | 
				
			||||||
		evalFunc: evalBinaryNot,
 | 
							evalFunc: evalBinaryNot,
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -39,7 +39,7 @@ func newBinAndTerm(tk *Token) (inst *term) {
 | 
				
			|||||||
		tk:       *tk,
 | 
							tk:       *tk,
 | 
				
			||||||
		children: make([]*term, 0, 2),
 | 
							children: make([]*term, 0, 2),
 | 
				
			||||||
		position: posInfix,
 | 
							position: posInfix,
 | 
				
			||||||
		priority: priAnd,
 | 
							priority: priBinary,
 | 
				
			||||||
		evalFunc: evalBinaryAnd,
 | 
							evalFunc: evalBinaryAnd,
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -71,7 +71,7 @@ func newBinOrTerm(tk *Token) (inst *term) {
 | 
				
			|||||||
		tk:       *tk,
 | 
							tk:       *tk,
 | 
				
			||||||
		children: make([]*term, 0, 2),
 | 
							children: make([]*term, 0, 2),
 | 
				
			||||||
		position: posInfix,
 | 
							position: posInfix,
 | 
				
			||||||
		priority: priOr,
 | 
							priority: priBinary,
 | 
				
			||||||
		evalFunc: evalBinaryOr,
 | 
							evalFunc: evalBinaryOr,
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user