Resolve constant expressions for external constants.

* Allow constant expressions to be used as array sizes
  and as annotation values.

Bug: 31592132 allow constant expressions to be used as array sizes.
Bug: 31628863 Autofill values for enum type

Test: `make android.hardware.tests.expression@1.0` compiles
  and generates enum class Color with autofilled values.
Test: `make hidl_test_java` succeeds.
Test: `make hidl_test && adb sync && adb shell hidl_test` succeeds.
Test: `mma`

Change-Id: I57377ec608503d4741d305e98144264b07973055
diff --git a/AST.h b/AST.h
index 1f9d4f0..7aa2ea9 100644
--- a/AST.h
+++ b/AST.h
@@ -36,6 +36,7 @@
 struct NamedType;
 struct TypedVar;
 struct Scope;
+struct EnumValue;
 
 struct AST {
     AST(Coordinator *coordinator, const std::string &path);
@@ -63,6 +64,9 @@
 
     const std::string &getFilename() const;
 
+    // Look up an enum value by "FQName:valueName".
+    EnumValue *lookupEnumValue(const FQName &fqName, std::string *errorMsg);
+
     // Look up a type by FQName, "pure" names, i.e. those without package
     // or version are first looked up in the current scope chain.
     // After that lookup proceeds to imports.