mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
@ -12,7 +12,7 @@ mut:
|
||||
|
||||
[inline]
|
||||
fn is_null(data int) bool {
|
||||
return data == null_element
|
||||
return data == html.null_element
|
||||
}
|
||||
|
||||
[inline]
|
||||
@ -21,15 +21,11 @@ fn (stack Stack) is_empty() bool {
|
||||
}
|
||||
|
||||
fn (stack Stack) peek() int {
|
||||
return if !stack.is_empty() {
|
||||
stack.elements[stack.size - 1]
|
||||
} else {
|
||||
null_element
|
||||
}
|
||||
return if !stack.is_empty() { stack.elements[stack.size - 1] } else { html.null_element }
|
||||
}
|
||||
|
||||
fn (mut stack Stack) pop() int {
|
||||
mut to_return := null_element
|
||||
mut to_return := html.null_element
|
||||
if !stack.is_empty() {
|
||||
to_return = stack.elements[stack.size - 1]
|
||||
stack.size--
|
||||
|
Reference in New Issue
Block a user