ADT
ast-experimental
Last change
on this file since fdc042d was 702e826, checked in by Andrew Beach <ajbeach@…>, 3 years ago |
Pre-translation pass on the parser. Entirely code readability improvements, no behaviour (on a larger scale) should be effected.
|
-
Property mode
set to
100644
|
File size:
951 bytes
|
Rev | Line | |
---|
[b87a5ed] | 1 | //
|
---|
| 2 | // Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
|
---|
| 3 | //
|
---|
| 4 | // The contents of this file are covered under the licence agreement in the
|
---|
| 5 | // file "LICENCE" distributed with Cforall.
|
---|
| 6 | //
|
---|
[4b60b28] | 7 | // parserutility.h -- Collected utilities for the parser.
|
---|
[b87a5ed] | 8 | //
|
---|
| 9 | // Author : Rodolfo G. Esteves
|
---|
| 10 | // Created On : Sat May 16 15:31:46 2015
|
---|
[4b60b28] | 11 | // Last Modified By : Andrew Beach
|
---|
[702e826] | 12 | // Last Modified On : Thr Mar 9 12:16:00 2023
|
---|
| 13 | // Update Count : 6
|
---|
[b87a5ed] | 14 | //
|
---|
| 15 |
|
---|
[6b0b624] | 16 | #pragma once
|
---|
[51b73452] | 17 |
|
---|
[d180746] | 18 | class Expression;
|
---|
[51b73452] | 19 |
|
---|
| 20 | Expression *notZeroExpr( Expression *orig );
|
---|
| 21 |
|
---|
[702e826] | 22 | template< typename T >
|
---|
| 23 | static inline auto maybeBuild( const T *orig ) -> decltype(orig->build()) {
|
---|
| 24 | return (orig) ? orig->build() : nullptr;
|
---|
[4b60b28] | 25 | }
|
---|
| 26 |
|
---|
[702e826] | 27 | template< typename T >
|
---|
| 28 | static inline auto maybeMoveBuild( const T *orig ) -> decltype(orig->build()) {
|
---|
| 29 | auto ret = maybeBuild<T>(orig);
|
---|
[4b60b28] | 30 | delete orig;
|
---|
| 31 | return ret;
|
---|
| 32 | }
|
---|
| 33 |
|
---|
[b87a5ed] | 34 | // Local Variables: //
|
---|
| 35 | // tab-width: 4 //
|
---|
| 36 | // mode: c++ //
|
---|
| 37 | // compile-command: "make install" //
|
---|
| 38 | // End: //
|
---|
Note:
See
TracBrowser
for help on using the repository browser.