2
0
mirror of https://github.com/esiur/esiur-dart.git synced 2026-04-04 10:18:20 +00:00

Annotations

This commit is contained in:
2022-06-16 04:51:26 +03:00
parent 0f52fec828
commit 437121f223
10 changed files with 189 additions and 286 deletions

View File

@@ -8,19 +8,19 @@ import 'TypeTemplate.dart';
class ConstantTemplate extends MemberTemplate {
final dynamic value;
final String? expansion;
final String? annotation;
final RepresentationType valueType;
ConstantTemplate(TypeTemplate template, int index, String name,
bool inherited, this.valueType, this.value, this.expansion)
bool inherited, this.valueType, this.value, this.annotation)
: super(template, index, name, inherited) {}
DC compose() {
var name = super.compose();
var hdr = inherited ? 0x80 : 0;
if (expansion != null) {
var exp = DC.stringToBytes(expansion!);
if (annotation != null) {
var exp = DC.stringToBytes(annotation!);
hdr |= 0x70;
return (BinaryList()
..addUint8(hdr)