Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ A clear and concise description of what the bug is.
Steps to reproduce the behavior:
1. I create code for this and that
2. With a test for this and that
3. Instead of seeng this
3. Instead of seeing this
4. I see that

**Expected behavior**
Expand Down
8 changes: 7 additions & 1 deletion ast/Salience.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

package ast

import "math"

// NewSalience create new Salience AST object
func NewSalience(val int) *Salience {

Expand All @@ -34,5 +36,9 @@ type SalienceReceiver interface {

// AcceptIntegerLiteral accept the assigned integer
func (sal *Salience) AcceptIntegerLiteral(lit *IntegerLiteral) {
sal.SalienceValue = int(lit.Integer)
if lit.Integer >= math.MinInt32 && lit.Integer <= math.MaxInt32 {
sal.SalienceValue = int(lit.Integer)
} else {
panic("Salience value out of range")
}
}
Loading