/vqdr/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/vqdr/trunk

« back to all changes in this revision

Viewing changes to src/libvqdr/root_token.vala

  • Committer: Gustav Hartvigsson
  • Date: 2020-06-07 18:48:24 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20200607184824-jf14f7a1b1di2i2q
* Initial code - far from done

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
namespace VQDR.Expression {
 
2
  
 
3
  public class RootToken : Token {
 
4
    
 
5
    construct {
 
6
      this.priority = 0;
 
7
      this.mandatory_num_child = 1;
 
8
      this.optional_num_child = 0;
 
9
    }
 
10
    
 
11
    public RootToken (Token? root = null) {
 
12
      base (0);
 
13
      this.set_child (1, root);
 
14
    }
 
15
    
 
16
    protected override void evaluate_self (Context instance) throws GLib.Error {
 
17
      Token? child = get_child (1);
 
18
      child.evaluate (instance);
 
19
      this.result_value = child.result_value;
 
20
      this.result_max_value = child.result_max_value;
 
21
      this.result_min_value = child.result_min_value;
 
22
      this.result_string = child.result_string;
 
23
      
 
24
    }
 
25
    
 
26
  }
 
27
  
 
28
}