-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathscheme.yml
43 lines (33 loc) · 832 Bytes
/
scheme.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
- hosts: localhost
gather_facts: false
tasks:
- assert:
that: "{{ program_path is defined }}"
fail_msg: need program path
- name: Initialize stack
set_fact:
stack: []
- name: Load program
set_fact:
program: '{{ lookup("file", program_path) }}'
- name: Parse program
include_role:
name: parse
- debug:
var: cst
- name: Extract AST
include_role:
name: extract-ast
- debug:
var: ast
- include_vars: call/builtins/vars.yml
- name: Set up context
set_fact:
env: # Current environment, initially empty
parent:
bindings: {}
expr: "{{ ast }}"
- name: Start evaluation
include_tasks: eval.yml
- debug:
msg: "Final result is: {{ result }}"