NEURON
json_visitor.cpp
Go to the documentation of this file.
1 /*
2  * Copyright 2023 Blue Brain Project, EPFL.
3  * See the top-level LICENSE file for details.
4  *
5  * SPDX-License-Identifier: Apache-2.0
6  */
7 
8 ///
9 /// THIS FILE IS GENERATED AT BUILD TIME AND SHALL NOT BE EDITED.
10 ///
11 
13 
14 #include "ast/all.hpp"
16 
17 namespace nmodl {
18 namespace visitor {
19 
20 using namespace ast;
21 
23  (void)node;
24  printer->add_node("Node");
25 }
26 
28  (void)node;
29  printer->add_node("Statement");
30 }
31 
33  (void)node;
34  printer->add_node("Expression");
35 }
36 
38  (void)node;
39  printer->add_node("Block");
40 }
41 
43  (void)node;
44  printer->add_node("Identifier");
45 }
46 
48  (void)node;
49  printer->add_node("Number");
50 }
51 
53  printer->push_block(node.get_node_type_name());
54  if (embed_nmodl) {
55  printer->add_block_property("nmodl", to_nmodl(node));
56  }
57  node.visit_children(*this);
58  std::stringstream ss;
59  ss << node.eval();
60  printer->add_node(ss.str());
61  printer->pop_block();
62 }
63 
65  printer->push_block(node.get_node_type_name());
66  if (embed_nmodl) {
67  printer->add_block_property("nmodl", to_nmodl(node));
68  }
69  node.visit_children(*this);
70  if(!node.get_macro()) {
71  std::stringstream ss;
72  ss << node.eval();
73  printer->add_node(ss.str());
74  }
75  printer->pop_block();
76 }
77 
79  printer->push_block(node.get_node_type_name());
80  if (embed_nmodl) {
81  printer->add_block_property("nmodl", to_nmodl(node));
82  }
83  node.visit_children(*this);
84  std::stringstream ss;
85  ss << node.eval();
86  printer->add_node(ss.str());
87  printer->pop_block();
88 }
89 
91  printer->push_block(node.get_node_type_name());
92  if (embed_nmodl) {
93  printer->add_block_property("nmodl", to_nmodl(node));
94  }
95  node.visit_children(*this);
96  std::stringstream ss;
97  ss << node.eval();
98  printer->add_node(ss.str());
99  printer->pop_block();
100 }
101 
103  printer->push_block(node.get_node_type_name());
104  if (embed_nmodl) {
105  printer->add_block_property("nmodl", to_nmodl(node));
106  }
107  node.visit_children(*this);
108  std::stringstream ss;
109  ss << node.eval();
110  printer->add_node(ss.str());
111  printer->pop_block();
112 }
113 
115  printer->push_block(node.get_node_type_name());
116  if (embed_nmodl) {
117  printer->add_block_property("nmodl", to_nmodl(node));
118  }
119  node.visit_children(*this);
120  printer->pop_block();
121 }
122 
124  printer->push_block(node.get_node_type_name());
125  if (embed_nmodl) {
126  printer->add_block_property("nmodl", to_nmodl(node));
127  }
128  node.visit_children(*this);
129  printer->pop_block();
130 }
131 
133  printer->push_block(node.get_node_type_name());
134  if (embed_nmodl) {
135  printer->add_block_property("nmodl", to_nmodl(node));
136  }
137  node.visit_children(*this);
138  printer->pop_block();
139 }
140 
142  printer->push_block(node.get_node_type_name());
143  if (embed_nmodl) {
144  printer->add_block_property("nmodl", to_nmodl(node));
145  }
146  node.visit_children(*this);
147  printer->pop_block();
148 }
149 
151  printer->push_block(node.get_node_type_name());
152  if (embed_nmodl) {
153  printer->add_block_property("nmodl", to_nmodl(node));
154  }
155  node.visit_children(*this);
156  printer->pop_block();
157 }
158 
160  printer->push_block(node.get_node_type_name());
161  if (embed_nmodl) {
162  printer->add_block_property("nmodl", to_nmodl(node));
163  }
164  node.visit_children(*this);
165  printer->pop_block();
166 }
167 
169  printer->push_block(node.get_node_type_name());
170  if (embed_nmodl) {
171  printer->add_block_property("nmodl", to_nmodl(node));
172  }
173  node.visit_children(*this);
174  printer->pop_block();
175 }
176 
178  printer->push_block(node.get_node_type_name());
179  if (embed_nmodl) {
180  printer->add_block_property("nmodl", to_nmodl(node));
181  }
182  node.visit_children(*this);
183  printer->pop_block();
184 }
185 
187  printer->push_block(node.get_node_type_name());
188  if (embed_nmodl) {
189  printer->add_block_property("nmodl", to_nmodl(node));
190  }
191  node.visit_children(*this);
192  printer->pop_block();
193 }
194 
196  printer->push_block(node.get_node_type_name());
197  if (embed_nmodl) {
198  printer->add_block_property("nmodl", to_nmodl(node));
199  }
200  node.visit_children(*this);
201  printer->pop_block();
202 }
203 
205  printer->push_block(node.get_node_type_name());
206  if (embed_nmodl) {
207  printer->add_block_property("nmodl", to_nmodl(node));
208  }
209  node.visit_children(*this);
210  printer->pop_block();
211 }
212 
214  printer->push_block(node.get_node_type_name());
215  if (embed_nmodl) {
216  printer->add_block_property("nmodl", to_nmodl(node));
217  }
218  node.visit_children(*this);
219  printer->pop_block();
220 }
221 
223  printer->push_block(node.get_node_type_name());
224  if (embed_nmodl) {
225  printer->add_block_property("nmodl", to_nmodl(node));
226  }
227  node.visit_children(*this);
228  printer->pop_block();
229 }
230 
232  printer->push_block(node.get_node_type_name());
233  if (embed_nmodl) {
234  printer->add_block_property("nmodl", to_nmodl(node));
235  }
236  node.visit_children(*this);
237  printer->pop_block();
238 }
239 
241  printer->push_block(node.get_node_type_name());
242  if (embed_nmodl) {
243  printer->add_block_property("nmodl", to_nmodl(node));
244  }
245  node.visit_children(*this);
246  printer->pop_block();
247 }
248 
250  printer->push_block(node.get_node_type_name());
251  if (embed_nmodl) {
252  printer->add_block_property("nmodl", to_nmodl(node));
253  }
254  node.visit_children(*this);
255  printer->pop_block();
256 }
257 
259  printer->push_block(node.get_node_type_name());
260  if (embed_nmodl) {
261  printer->add_block_property("nmodl", to_nmodl(node));
262  }
263  node.visit_children(*this);
264  printer->pop_block();
265 }
266 
268  printer->push_block(node.get_node_type_name());
269  if (embed_nmodl) {
270  printer->add_block_property("nmodl", to_nmodl(node));
271  }
272  node.visit_children(*this);
273  printer->pop_block();
274 }
275 
277  printer->push_block(node.get_node_type_name());
278  if (embed_nmodl) {
279  printer->add_block_property("nmodl", to_nmodl(node));
280  }
281  node.visit_children(*this);
282  printer->pop_block();
283 }
284 
286  printer->push_block(node.get_node_type_name());
287  if (embed_nmodl) {
288  printer->add_block_property("nmodl", to_nmodl(node));
289  }
290  node.visit_children(*this);
291  printer->pop_block();
292 }
293 
295  printer->push_block(node.get_node_type_name());
296  if (embed_nmodl) {
297  printer->add_block_property("nmodl", to_nmodl(node));
298  }
299  node.visit_children(*this);
300  printer->pop_block();
301 }
302 
304  printer->push_block(node.get_node_type_name());
305  if (embed_nmodl) {
306  printer->add_block_property("nmodl", to_nmodl(node));
307  }
308  node.visit_children(*this);
309  printer->pop_block();
310 }
311 
313  printer->push_block(node.get_node_type_name());
314  if (embed_nmodl) {
315  printer->add_block_property("nmodl", to_nmodl(node));
316  }
317  node.visit_children(*this);
318  printer->pop_block();
319 }
320 
322  printer->push_block(node.get_node_type_name());
323  if (embed_nmodl) {
324  printer->add_block_property("nmodl", to_nmodl(node));
325  }
326  node.visit_children(*this);
327  printer->pop_block();
328 }
329 
331  printer->push_block(node.get_node_type_name());
332  if (embed_nmodl) {
333  printer->add_block_property("nmodl", to_nmodl(node));
334  }
335  node.visit_children(*this);
336  printer->pop_block();
337 }
338 
340  printer->push_block(node.get_node_type_name());
341  if (embed_nmodl) {
342  printer->add_block_property("nmodl", to_nmodl(node));
343  }
344  node.visit_children(*this);
345  printer->pop_block();
346 }
347 
349  printer->push_block(node.get_node_type_name());
350  if (embed_nmodl) {
351  printer->add_block_property("nmodl", to_nmodl(node));
352  }
353  node.visit_children(*this);
354  printer->pop_block();
355 }
356 
358  printer->push_block(node.get_node_type_name());
359  if (embed_nmodl) {
360  printer->add_block_property("nmodl", to_nmodl(node));
361  }
362  node.visit_children(*this);
363  printer->pop_block();
364 }
365 
367  printer->push_block(node.get_node_type_name());
368  if (embed_nmodl) {
369  printer->add_block_property("nmodl", to_nmodl(node));
370  }
371  node.visit_children(*this);
372  printer->pop_block();
373 }
374 
376  printer->push_block(node.get_node_type_name());
377  if (embed_nmodl) {
378  printer->add_block_property("nmodl", to_nmodl(node));
379  }
380  node.visit_children(*this);
381  printer->pop_block();
382 }
383 
385  printer->push_block(node.get_node_type_name());
386  if (embed_nmodl) {
387  printer->add_block_property("nmodl", to_nmodl(node));
388  }
389  node.visit_children(*this);
390  printer->pop_block();
391 }
392 
394  printer->push_block(node.get_node_type_name());
395  if (embed_nmodl) {
396  printer->add_block_property("nmodl", to_nmodl(node));
397  }
398  node.visit_children(*this);
399  printer->pop_block();
400 }
401 
403  printer->push_block(node.get_node_type_name());
404  if (embed_nmodl) {
405  printer->add_block_property("nmodl", to_nmodl(node));
406  }
407  node.visit_children(*this);
408  printer->pop_block();
409 }
410 
412  printer->push_block(node.get_node_type_name());
413  if (embed_nmodl) {
414  printer->add_block_property("nmodl", to_nmodl(node));
415  }
416  node.visit_children(*this);
417  printer->pop_block();
418 }
419 
421  printer->push_block(node.get_node_type_name());
422  if (embed_nmodl) {
423  printer->add_block_property("nmodl", to_nmodl(node));
424  }
425  node.visit_children(*this);
426  printer->pop_block();
427 }
428 
430  printer->push_block(node.get_node_type_name());
431  if (embed_nmodl) {
432  printer->add_block_property("nmodl", to_nmodl(node));
433  }
434  node.visit_children(*this);
435  printer->pop_block();
436 }
437 
439  printer->push_block(node.get_node_type_name());
440  if (embed_nmodl) {
441  printer->add_block_property("nmodl", to_nmodl(node));
442  }
443  node.visit_children(*this);
444  printer->pop_block();
445 }
446 
448  printer->push_block(node.get_node_type_name());
449  if (embed_nmodl) {
450  printer->add_block_property("nmodl", to_nmodl(node));
451  }
452  node.visit_children(*this);
453  printer->pop_block();
454 }
455 
457  printer->push_block(node.get_node_type_name());
458  if (embed_nmodl) {
459  printer->add_block_property("nmodl", to_nmodl(node));
460  }
461  node.visit_children(*this);
462  printer->pop_block();
463 }
464 
466  printer->push_block(node.get_node_type_name());
467  if (embed_nmodl) {
468  printer->add_block_property("nmodl", to_nmodl(node));
469  }
470  node.visit_children(*this);
471  printer->pop_block();
472 }
473 
475  printer->push_block(node.get_node_type_name());
476  if (embed_nmodl) {
477  printer->add_block_property("nmodl", to_nmodl(node));
478  }
479  node.visit_children(*this);
480  printer->pop_block();
481 }
482 
484  printer->push_block(node.get_node_type_name());
485  if (embed_nmodl) {
486  printer->add_block_property("nmodl", to_nmodl(node));
487  }
488  node.visit_children(*this);
489  printer->pop_block();
490 }
491 
493  printer->push_block(node.get_node_type_name());
494  if (embed_nmodl) {
495  printer->add_block_property("nmodl", to_nmodl(node));
496  }
497  node.visit_children(*this);
498  printer->pop_block();
499 }
500 
502  printer->push_block(node.get_node_type_name());
503  if (embed_nmodl) {
504  printer->add_block_property("nmodl", to_nmodl(node));
505  }
506  node.visit_children(*this);
507  printer->pop_block();
508 }
509 
511  printer->push_block(node.get_node_type_name());
512  if (embed_nmodl) {
513  printer->add_block_property("nmodl", to_nmodl(node));
514  }
515  node.visit_children(*this);
516  printer->pop_block();
517 }
518 
520  printer->push_block(node.get_node_type_name());
521  if (embed_nmodl) {
522  printer->add_block_property("nmodl", to_nmodl(node));
523  }
524  node.visit_children(*this);
525  printer->pop_block();
526 }
527 
529  printer->push_block(node.get_node_type_name());
530  if (embed_nmodl) {
531  printer->add_block_property("nmodl", to_nmodl(node));
532  }
533  node.visit_children(*this);
534  printer->pop_block();
535 }
536 
538  printer->push_block(node.get_node_type_name());
539  if (embed_nmodl) {
540  printer->add_block_property("nmodl", to_nmodl(node));
541  }
542  node.visit_children(*this);
543  printer->pop_block();
544 }
545 
547  printer->push_block(node.get_node_type_name());
548  if (embed_nmodl) {
549  printer->add_block_property("nmodl", to_nmodl(node));
550  }
551  node.visit_children(*this);
552  std::stringstream ss;
553  ss << node.eval();
554  printer->add_node(ss.str());
555  printer->pop_block();
556 }
557 
559  printer->push_block(node.get_node_type_name());
560  if (embed_nmodl) {
561  printer->add_block_property("nmodl", to_nmodl(node));
562  }
563  node.visit_children(*this);
564  std::stringstream ss;
565  ss << node.eval();
566  printer->add_node(ss.str());
567  printer->pop_block();
568 }
569 
571  printer->push_block(node.get_node_type_name());
572  if (embed_nmodl) {
573  printer->add_block_property("nmodl", to_nmodl(node));
574  }
575  node.visit_children(*this);
576  std::stringstream ss;
577  ss << node.eval();
578  printer->add_node(ss.str());
579  printer->pop_block();
580 }
581 
583  printer->push_block(node.get_node_type_name());
584  if (embed_nmodl) {
585  printer->add_block_property("nmodl", to_nmodl(node));
586  }
587  node.visit_children(*this);
588  printer->pop_block();
589 }
590 
592  printer->push_block(node.get_node_type_name());
593  if (embed_nmodl) {
594  printer->add_block_property("nmodl", to_nmodl(node));
595  }
596  node.visit_children(*this);
597  printer->pop_block();
598 }
599 
601  printer->push_block(node.get_node_type_name());
602  if (embed_nmodl) {
603  printer->add_block_property("nmodl", to_nmodl(node));
604  }
605  node.visit_children(*this);
606  printer->pop_block();
607 }
608 
610  printer->push_block(node.get_node_type_name());
611  if (embed_nmodl) {
612  printer->add_block_property("nmodl", to_nmodl(node));
613  }
614  node.visit_children(*this);
615  printer->pop_block();
616 }
617 
619  printer->push_block(node.get_node_type_name());
620  if (embed_nmodl) {
621  printer->add_block_property("nmodl", to_nmodl(node));
622  }
623  node.visit_children(*this);
624  printer->pop_block();
625 }
626 
628  printer->push_block(node.get_node_type_name());
629  if (embed_nmodl) {
630  printer->add_block_property("nmodl", to_nmodl(node));
631  }
632  node.visit_children(*this);
633  printer->pop_block();
634 }
635 
637  printer->push_block(node.get_node_type_name());
638  if (embed_nmodl) {
639  printer->add_block_property("nmodl", to_nmodl(node));
640  }
641  node.visit_children(*this);
642  printer->pop_block();
643 }
644 
646  printer->push_block(node.get_node_type_name());
647  if (embed_nmodl) {
648  printer->add_block_property("nmodl", to_nmodl(node));
649  }
650  node.visit_children(*this);
651  printer->pop_block();
652 }
653 
655  printer->push_block(node.get_node_type_name());
656  if (embed_nmodl) {
657  printer->add_block_property("nmodl", to_nmodl(node));
658  }
659  node.visit_children(*this);
660  std::stringstream ss;
661  ss << node.eval();
662  printer->add_node(ss.str());
663  printer->pop_block();
664 }
665 
667  printer->push_block(node.get_node_type_name());
668  if (embed_nmodl) {
669  printer->add_block_property("nmodl", to_nmodl(node));
670  }
671  node.visit_children(*this);
672  printer->pop_block();
673 }
674 
676  printer->push_block(node.get_node_type_name());
677  if (embed_nmodl) {
678  printer->add_block_property("nmodl", to_nmodl(node));
679  }
680  node.visit_children(*this);
681  printer->pop_block();
682 }
683 
685  printer->push_block(node.get_node_type_name());
686  if (embed_nmodl) {
687  printer->add_block_property("nmodl", to_nmodl(node));
688  }
689  node.visit_children(*this);
690  printer->pop_block();
691 }
692 
694  printer->push_block(node.get_node_type_name());
695  if (embed_nmodl) {
696  printer->add_block_property("nmodl", to_nmodl(node));
697  }
698  node.visit_children(*this);
699  std::stringstream ss;
700  ss << node.eval();
701  printer->add_node(ss.str());
702  printer->pop_block();
703 }
704 
706  printer->push_block(node.get_node_type_name());
707  if (embed_nmodl) {
708  printer->add_block_property("nmodl", to_nmodl(node));
709  }
710  node.visit_children(*this);
711  printer->pop_block();
712 }
713 
715  printer->push_block(node.get_node_type_name());
716  if (embed_nmodl) {
717  printer->add_block_property("nmodl", to_nmodl(node));
718  }
719  node.visit_children(*this);
720  printer->pop_block();
721 }
722 
724  printer->push_block(node.get_node_type_name());
725  if (embed_nmodl) {
726  printer->add_block_property("nmodl", to_nmodl(node));
727  }
728  node.visit_children(*this);
729  printer->pop_block();
730 }
731 
733  printer->push_block(node.get_node_type_name());
734  if (embed_nmodl) {
735  printer->add_block_property("nmodl", to_nmodl(node));
736  }
737  node.visit_children(*this);
738  printer->pop_block();
739 }
740 
742  printer->push_block(node.get_node_type_name());
743  if (embed_nmodl) {
744  printer->add_block_property("nmodl", to_nmodl(node));
745  }
746  node.visit_children(*this);
747  printer->pop_block();
748 }
749 
751  printer->push_block(node.get_node_type_name());
752  if (embed_nmodl) {
753  printer->add_block_property("nmodl", to_nmodl(node));
754  }
755  node.visit_children(*this);
756  printer->pop_block();
757 }
758 
760  printer->push_block(node.get_node_type_name());
761  if (embed_nmodl) {
762  printer->add_block_property("nmodl", to_nmodl(node));
763  }
764  node.visit_children(*this);
765  printer->pop_block();
766 }
767 
769  printer->push_block(node.get_node_type_name());
770  if (embed_nmodl) {
771  printer->add_block_property("nmodl", to_nmodl(node));
772  }
773  node.visit_children(*this);
774  printer->pop_block();
775 }
776 
778  printer->push_block(node.get_node_type_name());
779  if (embed_nmodl) {
780  printer->add_block_property("nmodl", to_nmodl(node));
781  }
782  node.visit_children(*this);
783  printer->pop_block();
784 }
785 
787  printer->push_block(node.get_node_type_name());
788  if (embed_nmodl) {
789  printer->add_block_property("nmodl", to_nmodl(node));
790  }
791  node.visit_children(*this);
792  printer->pop_block();
793 }
794 
796  printer->push_block(node.get_node_type_name());
797  if (embed_nmodl) {
798  printer->add_block_property("nmodl", to_nmodl(node));
799  }
800  node.visit_children(*this);
801  printer->pop_block();
802 }
803 
805  printer->push_block(node.get_node_type_name());
806  if (embed_nmodl) {
807  printer->add_block_property("nmodl", to_nmodl(node));
808  }
809  node.visit_children(*this);
810  printer->pop_block();
811 }
812 
814  printer->push_block(node.get_node_type_name());
815  if (embed_nmodl) {
816  printer->add_block_property("nmodl", to_nmodl(node));
817  }
818  node.visit_children(*this);
819  printer->pop_block();
820 }
821 
823  printer->push_block(node.get_node_type_name());
824  if (embed_nmodl) {
825  printer->add_block_property("nmodl", to_nmodl(node));
826  }
827  node.visit_children(*this);
828  printer->pop_block();
829 }
830 
832  printer->push_block(node.get_node_type_name());
833  if (embed_nmodl) {
834  printer->add_block_property("nmodl", to_nmodl(node));
835  }
836  node.visit_children(*this);
837  printer->pop_block();
838 }
839 
841  (void)node;
842  printer->add_node("MutexLock");
843 }
844 
846  (void)node;
847  printer->add_node("MutexUnlock");
848 }
849 
851  printer->push_block(node.get_node_type_name());
852  if (embed_nmodl) {
853  printer->add_block_property("nmodl", to_nmodl(node));
854  }
855  node.visit_children(*this);
856  printer->pop_block();
857 }
858 
860  printer->push_block(node.get_node_type_name());
861  if (embed_nmodl) {
862  printer->add_block_property("nmodl", to_nmodl(node));
863  }
864  node.visit_children(*this);
865  printer->pop_block();
866 }
867 
869  printer->push_block(node.get_node_type_name());
870  if (embed_nmodl) {
871  printer->add_block_property("nmodl", to_nmodl(node));
872  }
873  node.visit_children(*this);
874  printer->pop_block();
875 }
876 
878  printer->push_block(node.get_node_type_name());
879  if (embed_nmodl) {
880  printer->add_block_property("nmodl", to_nmodl(node));
881  }
882  node.visit_children(*this);
883  printer->pop_block();
884 }
885 
887  printer->push_block(node.get_node_type_name());
888  if (embed_nmodl) {
889  printer->add_block_property("nmodl", to_nmodl(node));
890  }
891  node.visit_children(*this);
892  printer->pop_block();
893 }
894 
896  printer->push_block(node.get_node_type_name());
897  if (embed_nmodl) {
898  printer->add_block_property("nmodl", to_nmodl(node));
899  }
900  node.visit_children(*this);
901  printer->pop_block();
902 }
903 
905  printer->push_block(node.get_node_type_name());
906  if (embed_nmodl) {
907  printer->add_block_property("nmodl", to_nmodl(node));
908  }
909  node.visit_children(*this);
910  printer->pop_block();
911 }
912 
914  printer->push_block(node.get_node_type_name());
915  if (embed_nmodl) {
916  printer->add_block_property("nmodl", to_nmodl(node));
917  }
918  node.visit_children(*this);
919  printer->pop_block();
920 }
921 
923  printer->push_block(node.get_node_type_name());
924  if (embed_nmodl) {
925  printer->add_block_property("nmodl", to_nmodl(node));
926  }
927  node.visit_children(*this);
928  printer->pop_block();
929 }
930 
932  printer->push_block(node.get_node_type_name());
933  if (embed_nmodl) {
934  printer->add_block_property("nmodl", to_nmodl(node));
935  }
936  node.visit_children(*this);
937  printer->pop_block();
938 }
939 
941  printer->push_block(node.get_node_type_name());
942  if (embed_nmodl) {
943  printer->add_block_property("nmodl", to_nmodl(node));
944  }
945  node.visit_children(*this);
946  printer->pop_block();
947 }
948 
950  printer->push_block(node.get_node_type_name());
951  if (embed_nmodl) {
952  printer->add_block_property("nmodl", to_nmodl(node));
953  }
954  node.visit_children(*this);
955  printer->pop_block();
956 }
957 
959  printer->push_block(node.get_node_type_name());
960  if (embed_nmodl) {
961  printer->add_block_property("nmodl", to_nmodl(node));
962  }
963  node.visit_children(*this);
964  printer->pop_block();
965 }
966 
968  printer->push_block(node.get_node_type_name());
969  if (embed_nmodl) {
970  printer->add_block_property("nmodl", to_nmodl(node));
971  }
972  node.visit_children(*this);
973  printer->pop_block();
974 }
975 
977  printer->push_block(node.get_node_type_name());
978  if (embed_nmodl) {
979  printer->add_block_property("nmodl", to_nmodl(node));
980  }
981  node.visit_children(*this);
982  printer->pop_block();
983 }
984 
986  printer->push_block(node.get_node_type_name());
987  if (embed_nmodl) {
988  printer->add_block_property("nmodl", to_nmodl(node));
989  }
990  node.visit_children(*this);
991  printer->pop_block();
992 }
993 
995  printer->push_block(node.get_node_type_name());
996  if (embed_nmodl) {
997  printer->add_block_property("nmodl", to_nmodl(node));
998  }
999  node.visit_children(*this);
1000  printer->pop_block();
1001 }
1002 
1004  (void)node;
1005  printer->add_node("ThreadSafe");
1006 }
1007 
1009  printer->push_block(node.get_node_type_name());
1010  if (embed_nmodl) {
1011  printer->add_block_property("nmodl", to_nmodl(node));
1012  }
1013  node.visit_children(*this);
1014  printer->pop_block();
1015 }
1016 
1018  printer->push_block(node.get_node_type_name());
1019  if (embed_nmodl) {
1020  printer->add_block_property("nmodl", to_nmodl(node));
1021  }
1022  node.visit_children(*this);
1023  printer->pop_block();
1024 }
1025 
1027  printer->push_block(node.get_node_type_name());
1028  if (embed_nmodl) {
1029  printer->add_block_property("nmodl", to_nmodl(node));
1030  }
1031  node.visit_children(*this);
1032  printer->pop_block();
1033 }
1034 
1036  printer->push_block(node.get_node_type_name());
1037  if (embed_nmodl) {
1038  printer->add_block_property("nmodl", to_nmodl(node));
1039  }
1040  node.visit_children(*this);
1041  printer->pop_block();
1042 }
1043 
1045  printer->push_block(node.get_node_type_name());
1046  if (embed_nmodl) {
1047  printer->add_block_property("nmodl", to_nmodl(node));
1048  }
1049  node.visit_children(*this);
1050  printer->pop_block();
1051  if (node.get_parent() == nullptr) {
1052  flush();
1053  }
1054 }
1055 
1057  printer->push_block(node.get_node_type_name());
1058  if (embed_nmodl) {
1059  printer->add_block_property("nmodl", to_nmodl(node));
1060  }
1061  node.visit_children(*this);
1062  printer->pop_block();
1063 }
1064 
1066  printer->push_block(node.get_node_type_name());
1067  if (embed_nmodl) {
1068  printer->add_block_property("nmodl", to_nmodl(node));
1069  }
1070  node.visit_children(*this);
1071  printer->pop_block();
1072 }
1073 
1075  printer->push_block(node.get_node_type_name());
1076  if (embed_nmodl) {
1077  printer->add_block_property("nmodl", to_nmodl(node));
1078  }
1079  node.visit_children(*this);
1080  printer->pop_block();
1081 }
1082 
1084  printer->push_block(node.get_node_type_name());
1085  if (embed_nmodl) {
1086  printer->add_block_property("nmodl", to_nmodl(node));
1087  }
1088  node.visit_children(*this);
1089  printer->pop_block();
1090 }
1091 
1093  printer->push_block(node.get_node_type_name());
1094  if (embed_nmodl) {
1095  printer->add_block_property("nmodl", to_nmodl(node));
1096  }
1097  node.visit_children(*this);
1098  printer->pop_block();
1099 }
1100 
1102  printer->push_block(node.get_node_type_name());
1103  if (embed_nmodl) {
1104  printer->add_block_property("nmodl", to_nmodl(node));
1105  }
1106  node.visit_children(*this);
1107  printer->pop_block();
1108 }
1109 
1111  printer->push_block(node.get_node_type_name());
1112  if (embed_nmodl) {
1113  printer->add_block_property("nmodl", to_nmodl(node));
1114  }
1115  node.visit_children(*this);
1116  printer->pop_block();
1117 }
1118 
1120  printer->push_block(node.get_node_type_name());
1121  if (embed_nmodl) {
1122  printer->add_block_property("nmodl", to_nmodl(node));
1123  }
1124  node.visit_children(*this);
1125  printer->pop_block();
1126 }
1127 
1129  printer->push_block(node.get_node_type_name());
1130  if (embed_nmodl) {
1131  printer->add_block_property("nmodl", to_nmodl(node));
1132  }
1133  node.visit_children(*this);
1134  printer->pop_block();
1135 }
1136 
1137 
1138 } // namespace visitor
1139 } // namespace nmodl
1140 
Auto generated AST classes declaration.
Represents a AFTER block in NMODL.
Definition: after_block.hpp:51
Represents an argument to functions and procedures.
Definition: argument.hpp:48
Represents a ASSIGNED block in the NMODL.
Represents a statement in ASSIGNED or STATE block.
Represents a block to be executed before or after another block.
Definition: ba_block.hpp:40
Type to represent different block types for before/after block.
Represents BBCOREPOINTER statement in NMODL.
Represent a single variable of type BBCOREPOINTER.
Represents a BEFORE block in NMODL.
Represents binary expression in the NMODL.
Operator used in ast::BinaryExpression.
Represents a multi-line comment in NMODL.
Base class for all block scoped nodes.
Definition: block.hpp:41
Represents a boolean variable.
Definition: boolean.hpp:42
Represents a BREAKPOINT block in NMODL.
Represent COMPARTMENT statement in NMODL.
Definition: compartment.hpp:39
Represents CONDUCTANCE statement in NMODL.
Represent CONSERVE statement in NMODL.
Definition: conserve.hpp:38
Represent CONSTANT block in the mod file.
Represent statement in CONSTANT block of NMODL.
Represents a variable in the ast::ConstantBlock.
Represents a CONSTRUCTOR block in the NMODL.
Represents a block used for variable timestep integration (CVODE) of DERIVATIVE blocks.
Definition: cvode_block.hpp:38
Represents a DEFINE statement in NMODL.
Definition: define.hpp:38
Represents DERIVATIVE block in the NMODL.
Represent a callback to NEURON's derivimplicit solver.
Represents a DESTRUCTOR block in the NMODL.
Represents differential equation in DERIVATIVE block.
Represents a double variable.
Definition: double.hpp:53
Represent linear solver solution block based on Eigen.
Represent newton solver solution block based on Eigen.
Represents ELECTRODE_CURRENT variables statement in NMODL.
Base class for all expressions in the NMODL.
Definition: expression.hpp:43
This construct is deprecated and no longer supported in the NMODL.
Definition: external.hpp:39
Represents a float variable.
Definition: float.hpp:44
Represents GLOBAL statement in NMODL.
Definition: global.hpp:39
Base class for all identifiers.
Definition: identifier.hpp:41
Represents an INCLUDE statement in NMODL.
Definition: include.hpp:39
Represents a INDEPENDENT block in the NMODL.
Represents specific element of an array variable.
Represents a INITIAL block in the NMODL.
Represents an integer variable.
Definition: integer.hpp:49
Represents a LAG statement in the mod file.
One equation in a system of equations tha collectively form a LINEAR block.
Represents a one line comment in NMODL.
Represents LINEAR block in the NMODL.
Represent LONGITUDINAL_DIFFUSION statement in NMODL.
Definition: lon_diffuse.hpp:39
Extracts information required for LONGITUDINAL_DIFFUSION for each KINETIC block.
Represent MUTEXLOCK statement in NMODL.
Definition: mutex_lock.hpp:38
Represent MUTEXUNLOCK statement in NMODL.
Represents a name.
Definition: name.hpp:44
Represent NEURON block in the mod file.
Base class for all AST node.
Definition: node.hpp:40
One equation in a system of equations that collectively make a NONLINEAR block.
Represents NONLINEAR block in the NMODL.
Represents NONSPECIFIC_CURRENT variables statement in NMODL.
Definition: nonspecific.hpp:39
Represents the coreneuron nrn_state callback function.
Base class for all numbers.
Definition: number.hpp:39
Represents CURIE information in NMODL.
Represents a PARAMETER block in the NMODL.
Definition: param_block.hpp:53
Represents POINTER statement in NMODL.
Definition: pointer.hpp:39
Represents a prime variable (for ODE)
Definition: prime_name.hpp:48
Represents top level AST node for whole NMODL input.
Definition: program.hpp:39
Single variable of type RANDOM.
Definition: random_var.hpp:38
Represents RANDOM statement in NMODL.
Represents RANGE variables statement in NMODL.
Definition: range.hpp:39
Represent solution of a block in the AST.
Represents a STATE block in the NMODL.
Definition: state_block.hpp:52
Represents block encapsulating list of statements.
Represents a string.
Definition: string.hpp:52
Represents SUFFIX statement in NMODL.
Definition: suffix.hpp:38
Represents TABLE statement in NMODL.
Represents THREADSAFE statement in NMODL.
Definition: thread_safe.hpp:38
Statement to indicate a change in timestep in a given block.
Definition: update_dt.hpp:38
Represents USEION statement in NMODL.
Definition: useion.hpp:40
Represents a variable.
Definition: var_name.hpp:43
Represents a C code block.
Definition: verbatim.hpp:38
Represent WATCH statement in NMODL.
Wrap any other expression type.
void visit_wrapped_expression(const ast::WrappedExpression &node) override
visit node of type ast::WrappedExpression
void visit_program(const ast::Program &node) override
visit node of type ast::Program
void visit_ontology_statement(const ast::OntologyStatement &node) override
visit node of type ast::OntologyStatement
void visit_expression_statement(const ast::ExpressionStatement &node) override
visit node of type ast::ExpressionStatement
void visit_var_name(const ast::VarName &node) override
visit node of type ast::VarName
void visit_eigen_linear_solver_block(const ast::EigenLinearSolverBlock &node) override
visit node of type ast::EigenLinearSolverBlock
void visit_nonspecific_cur_var(const ast::NonspecificCurVar &node) override
visit node of type ast::NonspecificCurVar
void visit_assigned_block(const ast::AssignedBlock &node) override
visit node of type ast::AssignedBlock
void visit_external(const ast::External &node) override
visit node of type ast::External
void visit_read_ion_var(const ast::ReadIonVar &node) override
visit node of type ast::ReadIonVar
void visit_define(const ast::Define &node) override
visit node of type ast::Define
void visit_protect_statement(const ast::ProtectStatement &node) override
visit node of type ast::ProtectStatement
void visit_react_var_name(const ast::ReactVarName &node) override
visit node of type ast::ReactVarName
void visit_nrn_state_block(const ast::NrnStateBlock &node) override
visit node of type ast::NrnStateBlock
void visit_linear_block(const ast::LinearBlock &node) override
visit node of type ast::LinearBlock
void visit_include(const ast::Include &node) override
visit node of type ast::Include
void visit_expression(const ast::Expression &node) override
visit node of type ast::Expression
void visit_compartment(const ast::Compartment &node) override
visit node of type ast::Compartment
void visit_global_var(const ast::GlobalVar &node) override
visit node of type ast::GlobalVar
void visit_reaction_operator(const ast::ReactionOperator &node) override
visit node of type ast::ReactionOperator
void visit_mutex_unlock(const ast::MutexUnlock &node) override
visit node of type ast::MutexUnlock
void visit_non_linear_block(const ast::NonLinearBlock &node) override
visit node of type ast::NonLinearBlock
void visit_cvode_block(const ast::CvodeBlock &node) override
visit node of type ast::CvodeBlock
void visit_model(const ast::Model &node) override
visit node of type ast::Model
void visit_block(const ast::Block &node) override
visit node of type ast::Block
void visit_unary_operator(const ast::UnaryOperator &node) override
visit node of type ast::UnaryOperator
void visit_verbatim(const ast::Verbatim &node) override
visit node of type ast::Verbatim
void visit_write_ion_var(const ast::WriteIonVar &node) override
visit node of type ast::WriteIonVar
void visit_boolean(const ast::Boolean &node) override
visit node of type ast::Boolean
void visit_reaction_statement(const ast::ReactionStatement &node) override
visit node of type ast::ReactionStatement
void visit_local_list_statement(const ast::LocalListStatement &node) override
visit node of type ast::LocalListStatement
void visit_kinetic_block(const ast::KineticBlock &node) override
visit node of type ast::KineticBlock
void visit_prime_name(const ast::PrimeName &node) override
visit node of type ast::PrimeName
void visit_ba_block(const ast::BABlock &node) override
visit node of type ast::BABlock
void visit_watch(const ast::Watch &node) override
visit node of type ast::Watch
void visit_procedure_block(const ast::ProcedureBlock &node) override
visit node of type ast::ProcedureBlock
void visit_electrode_current(const ast::ElectrodeCurrent &node) override
visit node of type ast::ElectrodeCurrent
void visit_solve_block(const ast::SolveBlock &node) override
visit node of type ast::SolveBlock
void visit_conserve(const ast::Conserve &node) override
visit node of type ast::Conserve
void visit_for_netcon(const ast::ForNetcon &node) override
visit node of type ast::ForNetcon
void visit_unit_block(const ast::UnitBlock &node) override
visit node of type ast::UnitBlock
void visit_suffix(const ast::Suffix &node) override
visit node of type ast::Suffix
void visit_statement(const ast::Statement &node) override
visit node of type ast::Statement
void visit_identifier(const ast::Identifier &node) override
visit node of type ast::Identifier
void visit_after_block(const ast::AfterBlock &node) override
visit node of type ast::AfterBlock
void visit_mutex_lock(const ast::MutexLock &node) override
visit node of type ast::MutexLock
void visit_longitudinal_diffusion_block(const ast::LongitudinalDiffusionBlock &node) override
visit node of type ast::LongitudinalDiffusionBlock
void visit_valence(const ast::Valence &node) override
visit node of type ast::Valence
void visit_bbcore_pointer_var(const ast::BbcorePointerVar &node) override
visit node of type ast::BbcorePointerVar
void visit_independent_block(const ast::IndependentBlock &node) override
visit node of type ast::IndependentBlock
void visit_table_statement(const ast::TableStatement &node) override
visit node of type ast::TableStatement
void visit_non_lin_equation(const ast::NonLinEquation &node) override
visit node of type ast::NonLinEquation
void visit_param_assign(const ast::ParamAssign &node) override
visit node of type ast::ParamAssign
void visit_ba_block_type(const ast::BABlockType &node) override
visit node of type ast::BABlockType
void visit_eigen_newton_solver_block(const ast::EigenNewtonSolverBlock &node) override
visit node of type ast::EigenNewtonSolverBlock
void visit_lag_statement(const ast::LagStatement &node) override
visit node of type ast::LagStatement
void visit_local_var(const ast::LocalVar &node) override
visit node of type ast::LocalVar
void visit_number(const ast::Number &node) override
visit node of type ast::Number
void visit_diff_eq_expression(const ast::DiffEqExpression &node) override
visit node of type ast::DiffEqExpression
void visit_number_range(const ast::NumberRange &node) override
visit node of type ast::NumberRange
void visit_destructor_block(const ast::DestructorBlock &node) override
visit node of type ast::DestructorBlock
void visit_node(const ast::Node &node) override
visit node of type ast::Node
void visit_constant_block(const ast::ConstantBlock &node) override
visit node of type ast::ConstantBlock
void visit_lon_diffuse(const ast::LonDiffuse &node) override
visit node of type ast::LonDiffuse
void visit_range(const ast::Range &node) override
visit node of type ast::Range
void visit_statement_block(const ast::StatementBlock &node) override
visit node of type ast::StatementBlock
void visit_from_statement(const ast::FromStatement &node) override
visit node of type ast::FromStatement
void visit_derivative_block(const ast::DerivativeBlock &node) override
visit node of type ast::DerivativeBlock
void visit_block_comment(const ast::BlockComment &node) override
visit node of type ast::BlockComment
void visit_line_comment(const ast::LineComment &node) override
visit node of type ast::LineComment
void visit_conductance_hint(const ast::ConductanceHint &node) override
visit node of type ast::ConductanceHint
void visit_watch_statement(const ast::WatchStatement &node) override
visit node of type ast::WatchStatement
void visit_unit_def(const ast::UnitDef &node) override
visit node of type ast::UnitDef
void visit_function_table_block(const ast::FunctionTableBlock &node) override
visit node of type ast::FunctionTableBlock
void visit_unary_expression(const ast::UnaryExpression &node) override
visit node of type ast::UnaryExpression
void visit_solution_expression(const ast::SolutionExpression &node) override
visit node of type ast::SolutionExpression
void visit_limits(const ast::Limits &node) override
visit node of type ast::Limits
void visit_factor_def(const ast::FactorDef &node) override
visit node of type ast::FactorDef
void visit_constant_var(const ast::ConstantVar &node) override
visit node of type ast::ConstantVar
void visit_else_statement(const ast::ElseStatement &node) override
visit node of type ast::ElseStatement
void visit_binary_operator(const ast::BinaryOperator &node) override
visit node of type ast::BinaryOperator
void visit_double_unit(const ast::DoubleUnit &node) override
visit node of type ast::DoubleUnit
void visit_nonspecific(const ast::Nonspecific &node) override
visit node of type ast::Nonspecific
void visit_if_statement(const ast::IfStatement &node) override
visit node of type ast::IfStatement
void visit_indexed_name(const ast::IndexedName &node) override
visit node of type ast::IndexedName
void visit_name(const ast::Name &node) override
visit node of type ast::Name
void visit_float(const ast::Float &node) override
visit node of type ast::Float
void visit_useion(const ast::Useion &node) override
visit node of type ast::Useion
void visit_random_var(const ast::RandomVar &node) override
visit node of type ast::RandomVar
void visit_constructor_block(const ast::ConstructorBlock &node) override
visit node of type ast::ConstructorBlock
void visit_state_block(const ast::StateBlock &node) override
visit node of type ast::StateBlock
void visit_net_receive_block(const ast::NetReceiveBlock &node) override
visit node of type ast::NetReceiveBlock
void visit_lin_equation(const ast::LinEquation &node) override
visit node of type ast::LinEquation
void visit_integer(const ast::Integer &node) override
visit node of type ast::Integer
void visit_initial_block(const ast::InitialBlock &node) override
visit node of type ast::InitialBlock
void visit_function_call(const ast::FunctionCall &node) override
visit node of type ast::FunctionCall
void visit_function_block(const ast::FunctionBlock &node) override
visit node of type ast::FunctionBlock
void visit_unit_state(const ast::UnitState &node) override
visit node of type ast::UnitState
void visit_unit(const ast::Unit &node) override
visit node of type ast::Unit
void visit_before_block(const ast::BeforeBlock &node) override
visit node of type ast::BeforeBlock
void visit_assigned_definition(const ast::AssignedDefinition &node) override
visit node of type ast::AssignedDefinition
void visit_pointer_var(const ast::PointerVar &node) override
visit node of type ast::PointerVar
void visit_paren_expression(const ast::ParenExpression &node) override
visit node of type ast::ParenExpression
void visit_bbcore_pointer(const ast::BbcorePointer &node) override
visit node of type ast::BbcorePointer
void visit_random_var_list(const ast::RandomVarList &node) override
visit node of type ast::RandomVarList
void visit_thread_safe(const ast::ThreadSafe &node) override
visit node of type ast::ThreadSafe
void visit_argument(const ast::Argument &node) override
visit node of type ast::Argument
void visit_electrode_cur_var(const ast::ElectrodeCurVar &node) override
visit node of type ast::ElectrodeCurVar
void visit_breakpoint_block(const ast::BreakpointBlock &node) override
visit node of type ast::BreakpointBlock
void visit_double(const ast::Double &node) override
visit node of type ast::Double
void visit_neuron_block(const ast::NeuronBlock &node) override
visit node of type ast::NeuronBlock
void visit_extern_var(const ast::ExternVar &node) override
visit node of type ast::ExternVar
void visit_binary_expression(const ast::BinaryExpression &node) override
visit node of type ast::BinaryExpression
void visit_update_dt(const ast::UpdateDt &node) override
visit node of type ast::UpdateDt
void visit_else_if_statement(const ast::ElseIfStatement &node) override
visit node of type ast::ElseIfStatement
void visit_global(const ast::Global &node) override
visit node of type ast::Global
void visit_range_var(const ast::RangeVar &node) override
visit node of type ast::RangeVar
void visit_while_statement(const ast::WhileStatement &node) override
visit node of type ast::WhileStatement
void visit_string(const ast::String &node) override
visit node of type ast::String
void visit_derivimplicit_callback(const ast::DerivimplicitCallback &node) override
visit node of type ast::DerivimplicitCallback
void visit_param_block(const ast::ParamBlock &node) override
visit node of type ast::ParamBlock
void visit_constant_statement(const ast::ConstantStatement &node) override
visit node of type ast::ConstantStatement
void visit_pointer(const ast::Pointer &node) override
visit node of type ast::Pointer
void visit_discrete_block(const ast::DiscreteBlock &node) override
visit node of type ast::DiscreteBlock
THIS FILE IS GENERATED AT BUILD TIME AND SHALL NOT BE EDITED.
encapsulates code generation backend implementations
Definition: ast_common.hpp:26
std::string to_nmodl(const ast::Ast &node, const std::set< ast::AstNodeType > &exclude_types)
Given AST node, return the NMODL string representation.
static Node * node(Object *)
Definition: netcvode.cpp:291
Utility functions for visitors implementation.