Shuffle around Constant node stuff
This commit is contained in:
parent
977e6332a7
commit
1527d10a80
1 changed files with 3 additions and 15 deletions
|
@ -1,19 +1,7 @@
|
||||||
/* node.rs
|
/* parser/nodes/mod.rs
|
||||||
* Eryn Wells <eryn@erynwells.me>
|
* Eryn Wells <eryn@erynwells.me>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use types::{Boolean, Number};
|
pub use self::constant::Constant;
|
||||||
|
|
||||||
trait ConstantValue {}
|
mod constant;
|
||||||
impl ConstantValue for Boolean {}
|
|
||||||
impl ConstantValue for Number {}
|
|
||||||
|
|
||||||
struct Constant<V: ConstantValue> {
|
|
||||||
value: V
|
|
||||||
}
|
|
||||||
|
|
||||||
impl<V: ConstantValue> Constant<V> {
|
|
||||||
fn new(value: V) -> Constant<V> {
|
|
||||||
Constant { value: value }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue