JS: serialize location of JsCase/JsDefault
See KT-21699
This commit is contained in:
+370
-89
@@ -32582,6 +32582,28 @@ public final class DebugJsAstProtoBuf {
|
||||
*/
|
||||
org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.StatementOrBuilder getStatementOrBuilder(
|
||||
int index);
|
||||
|
||||
/**
|
||||
* <code>optional int32 fileId = 3;</code>
|
||||
*/
|
||||
boolean hasFileId();
|
||||
/**
|
||||
* <code>optional int32 fileId = 3;</code>
|
||||
*/
|
||||
int getFileId();
|
||||
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.serialization.js.ast.Location location = 4;</code>
|
||||
*/
|
||||
boolean hasLocation();
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.serialization.js.ast.Location location = 4;</code>
|
||||
*/
|
||||
org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.Location getLocation();
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.serialization.js.ast.Location location = 4;</code>
|
||||
*/
|
||||
org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.LocationOrBuilder getLocationOrBuilder();
|
||||
}
|
||||
/**
|
||||
* Protobuf type {@code org.jetbrains.kotlin.serialization.js.ast.SwitchEntry}
|
||||
@@ -32656,6 +32678,24 @@ public final class DebugJsAstProtoBuf {
|
||||
statement_.add(input.readMessage(org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.Statement.PARSER, extensionRegistry));
|
||||
break;
|
||||
}
|
||||
case 24: {
|
||||
bitField0_ |= 0x00000002;
|
||||
fileId_ = input.readInt32();
|
||||
break;
|
||||
}
|
||||
case 34: {
|
||||
org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.Location.Builder subBuilder = null;
|
||||
if (((bitField0_ & 0x00000004) == 0x00000004)) {
|
||||
subBuilder = location_.toBuilder();
|
||||
}
|
||||
location_ = input.readMessage(org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.Location.PARSER, extensionRegistry);
|
||||
if (subBuilder != null) {
|
||||
subBuilder.mergeFrom(location_);
|
||||
location_ = subBuilder.buildPartial();
|
||||
}
|
||||
bitField0_ |= 0x00000004;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
|
||||
@@ -32755,9 +32795,47 @@ public final class DebugJsAstProtoBuf {
|
||||
return statement_.get(index);
|
||||
}
|
||||
|
||||
public static final int FILEID_FIELD_NUMBER = 3;
|
||||
private int fileId_;
|
||||
/**
|
||||
* <code>optional int32 fileId = 3;</code>
|
||||
*/
|
||||
public boolean hasFileId() {
|
||||
return ((bitField0_ & 0x00000002) == 0x00000002);
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 fileId = 3;</code>
|
||||
*/
|
||||
public int getFileId() {
|
||||
return fileId_;
|
||||
}
|
||||
|
||||
public static final int LOCATION_FIELD_NUMBER = 4;
|
||||
private org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.Location location_;
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.serialization.js.ast.Location location = 4;</code>
|
||||
*/
|
||||
public boolean hasLocation() {
|
||||
return ((bitField0_ & 0x00000004) == 0x00000004);
|
||||
}
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.serialization.js.ast.Location location = 4;</code>
|
||||
*/
|
||||
public org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.Location getLocation() {
|
||||
return location_;
|
||||
}
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.serialization.js.ast.Location location = 4;</code>
|
||||
*/
|
||||
public org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.LocationOrBuilder getLocationOrBuilder() {
|
||||
return location_;
|
||||
}
|
||||
|
||||
private void initFields() {
|
||||
label_ = org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.Expression.getDefaultInstance();
|
||||
statement_ = java.util.Collections.emptyList();
|
||||
fileId_ = 0;
|
||||
location_ = org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.Location.getDefaultInstance();
|
||||
}
|
||||
private byte memoizedIsInitialized = -1;
|
||||
public final boolean isInitialized() {
|
||||
@@ -32777,6 +32855,12 @@ public final class DebugJsAstProtoBuf {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (hasLocation()) {
|
||||
if (!getLocation().isInitialized()) {
|
||||
memoizedIsInitialized = 0;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
memoizedIsInitialized = 1;
|
||||
return true;
|
||||
}
|
||||
@@ -32790,6 +32874,12 @@ public final class DebugJsAstProtoBuf {
|
||||
for (int i = 0; i < statement_.size(); i++) {
|
||||
output.writeMessage(2, statement_.get(i));
|
||||
}
|
||||
if (((bitField0_ & 0x00000002) == 0x00000002)) {
|
||||
output.writeInt32(3, fileId_);
|
||||
}
|
||||
if (((bitField0_ & 0x00000004) == 0x00000004)) {
|
||||
output.writeMessage(4, location_);
|
||||
}
|
||||
getUnknownFields().writeTo(output);
|
||||
}
|
||||
|
||||
@@ -32807,6 +32897,14 @@ public final class DebugJsAstProtoBuf {
|
||||
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
||||
.computeMessageSize(2, statement_.get(i));
|
||||
}
|
||||
if (((bitField0_ & 0x00000002) == 0x00000002)) {
|
||||
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
||||
.computeInt32Size(3, fileId_);
|
||||
}
|
||||
if (((bitField0_ & 0x00000004) == 0x00000004)) {
|
||||
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
||||
.computeMessageSize(4, location_);
|
||||
}
|
||||
size += getUnknownFields().getSerializedSize();
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
@@ -32918,6 +33016,7 @@ public final class DebugJsAstProtoBuf {
|
||||
if (org.jetbrains.kotlin.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
|
||||
getLabelFieldBuilder();
|
||||
getStatementFieldBuilder();
|
||||
getLocationFieldBuilder();
|
||||
}
|
||||
}
|
||||
private static Builder create() {
|
||||
@@ -32938,6 +33037,14 @@ public final class DebugJsAstProtoBuf {
|
||||
} else {
|
||||
statementBuilder_.clear();
|
||||
}
|
||||
fileId_ = 0;
|
||||
bitField0_ = (bitField0_ & ~0x00000004);
|
||||
if (locationBuilder_ == null) {
|
||||
location_ = org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.Location.getDefaultInstance();
|
||||
} else {
|
||||
locationBuilder_.clear();
|
||||
}
|
||||
bitField0_ = (bitField0_ & ~0x00000008);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -32983,6 +33090,18 @@ public final class DebugJsAstProtoBuf {
|
||||
} else {
|
||||
result.statement_ = statementBuilder_.build();
|
||||
}
|
||||
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
|
||||
to_bitField0_ |= 0x00000002;
|
||||
}
|
||||
result.fileId_ = fileId_;
|
||||
if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
|
||||
to_bitField0_ |= 0x00000004;
|
||||
}
|
||||
if (locationBuilder_ == null) {
|
||||
result.location_ = location_;
|
||||
} else {
|
||||
result.location_ = locationBuilder_.build();
|
||||
}
|
||||
result.bitField0_ = to_bitField0_;
|
||||
onBuilt();
|
||||
return result;
|
||||
@@ -33028,6 +33147,12 @@ public final class DebugJsAstProtoBuf {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (other.hasFileId()) {
|
||||
setFileId(other.getFileId());
|
||||
}
|
||||
if (other.hasLocation()) {
|
||||
mergeLocation(other.getLocation());
|
||||
}
|
||||
this.mergeUnknownFields(other.getUnknownFields());
|
||||
return this;
|
||||
}
|
||||
@@ -33045,6 +33170,12 @@ public final class DebugJsAstProtoBuf {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (hasLocation()) {
|
||||
if (!getLocation().isInitialized()) {
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -33423,6 +33554,154 @@ public final class DebugJsAstProtoBuf {
|
||||
return statementBuilder_;
|
||||
}
|
||||
|
||||
private int fileId_ ;
|
||||
/**
|
||||
* <code>optional int32 fileId = 3;</code>
|
||||
*/
|
||||
public boolean hasFileId() {
|
||||
return ((bitField0_ & 0x00000004) == 0x00000004);
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 fileId = 3;</code>
|
||||
*/
|
||||
public int getFileId() {
|
||||
return fileId_;
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 fileId = 3;</code>
|
||||
*/
|
||||
public Builder setFileId(int value) {
|
||||
bitField0_ |= 0x00000004;
|
||||
fileId_ = value;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 fileId = 3;</code>
|
||||
*/
|
||||
public Builder clearFileId() {
|
||||
bitField0_ = (bitField0_ & ~0x00000004);
|
||||
fileId_ = 0;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
private org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.Location location_ = org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.Location.getDefaultInstance();
|
||||
private org.jetbrains.kotlin.protobuf.SingleFieldBuilder<
|
||||
org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.Location, org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.Location.Builder, org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.LocationOrBuilder> locationBuilder_;
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.serialization.js.ast.Location location = 4;</code>
|
||||
*/
|
||||
public boolean hasLocation() {
|
||||
return ((bitField0_ & 0x00000008) == 0x00000008);
|
||||
}
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.serialization.js.ast.Location location = 4;</code>
|
||||
*/
|
||||
public org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.Location getLocation() {
|
||||
if (locationBuilder_ == null) {
|
||||
return location_;
|
||||
} else {
|
||||
return locationBuilder_.getMessage();
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.serialization.js.ast.Location location = 4;</code>
|
||||
*/
|
||||
public Builder setLocation(org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.Location value) {
|
||||
if (locationBuilder_ == null) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
location_ = value;
|
||||
onChanged();
|
||||
} else {
|
||||
locationBuilder_.setMessage(value);
|
||||
}
|
||||
bitField0_ |= 0x00000008;
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.serialization.js.ast.Location location = 4;</code>
|
||||
*/
|
||||
public Builder setLocation(
|
||||
org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.Location.Builder builderForValue) {
|
||||
if (locationBuilder_ == null) {
|
||||
location_ = builderForValue.build();
|
||||
onChanged();
|
||||
} else {
|
||||
locationBuilder_.setMessage(builderForValue.build());
|
||||
}
|
||||
bitField0_ |= 0x00000008;
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.serialization.js.ast.Location location = 4;</code>
|
||||
*/
|
||||
public Builder mergeLocation(org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.Location value) {
|
||||
if (locationBuilder_ == null) {
|
||||
if (((bitField0_ & 0x00000008) == 0x00000008) &&
|
||||
location_ != org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.Location.getDefaultInstance()) {
|
||||
location_ =
|
||||
org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.Location.newBuilder(location_).mergeFrom(value).buildPartial();
|
||||
} else {
|
||||
location_ = value;
|
||||
}
|
||||
onChanged();
|
||||
} else {
|
||||
locationBuilder_.mergeFrom(value);
|
||||
}
|
||||
bitField0_ |= 0x00000008;
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.serialization.js.ast.Location location = 4;</code>
|
||||
*/
|
||||
public Builder clearLocation() {
|
||||
if (locationBuilder_ == null) {
|
||||
location_ = org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.Location.getDefaultInstance();
|
||||
onChanged();
|
||||
} else {
|
||||
locationBuilder_.clear();
|
||||
}
|
||||
bitField0_ = (bitField0_ & ~0x00000008);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.serialization.js.ast.Location location = 4;</code>
|
||||
*/
|
||||
public org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.Location.Builder getLocationBuilder() {
|
||||
bitField0_ |= 0x00000008;
|
||||
onChanged();
|
||||
return getLocationFieldBuilder().getBuilder();
|
||||
}
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.serialization.js.ast.Location location = 4;</code>
|
||||
*/
|
||||
public org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.LocationOrBuilder getLocationOrBuilder() {
|
||||
if (locationBuilder_ != null) {
|
||||
return locationBuilder_.getMessageOrBuilder();
|
||||
} else {
|
||||
return location_;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.serialization.js.ast.Location location = 4;</code>
|
||||
*/
|
||||
private org.jetbrains.kotlin.protobuf.SingleFieldBuilder<
|
||||
org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.Location, org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.Location.Builder, org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.LocationOrBuilder>
|
||||
getLocationFieldBuilder() {
|
||||
if (locationBuilder_ == null) {
|
||||
locationBuilder_ = new org.jetbrains.kotlin.protobuf.SingleFieldBuilder<
|
||||
org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.Location, org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.Location.Builder, org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.LocationOrBuilder>(
|
||||
getLocation(),
|
||||
getParentForChildren(),
|
||||
isClean());
|
||||
location_ = null;
|
||||
}
|
||||
return locationBuilder_;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.serialization.js.ast.SwitchEntry)
|
||||
}
|
||||
|
||||
@@ -49474,101 +49753,103 @@ public final class DebugJsAstProtoBuf {
|
||||
"tch\022I\n\nexpression\030\001 \002(\01325.org.jetbrains." +
|
||||
"kotlin.serialization.js.ast.Expression\022E" +
|
||||
"\n\005entry\030\002 \003(\01326.org.jetbrains.kotlin.ser" +
|
||||
"ialization.js.ast.SwitchEntry\"\234\001\n\013Switch" +
|
||||
"ialization.js.ast.SwitchEntry\"\363\001\n\013Switch" +
|
||||
"Entry\022D\n\005label\030\001 \001(\01325.org.jetbrains.kot" +
|
||||
"lin.serialization.js.ast.Expression\022G\n\ts",
|
||||
"tatement\030\002 \003(\01324.org.jetbrains.kotlin.se" +
|
||||
"rialization.js.ast.Statement\"\225\001\n\005While\022H" +
|
||||
"\n\tcondition\030\001 \002(\01325.org.jetbrains.kotlin" +
|
||||
".serialization.js.ast.Expression\022B\n\004body" +
|
||||
"\030\002 \002(\01324.org.jetbrains.kotlin.serializat" +
|
||||
"ion.js.ast.Statement\"\227\001\n\007DoWhile\022H\n\tcond" +
|
||||
"ition\030\001 \002(\01325.org.jetbrains.kotlin.seria" +
|
||||
"lization.js.ast.Expression\022B\n\004body\030\002 \002(\013" +
|
||||
"24.org.jetbrains.kotlin.serialization.js" +
|
||||
".ast.Statement\"\304\003\n\003For\022I\n\tvariables\030\001 \001(",
|
||||
"\01324.org.jetbrains.kotlin.serialization.j" +
|
||||
"s.ast.StatementH\000\022K\n\nexpression\030\002 \001(\01325." +
|
||||
"org.jetbrains.kotlin.serialization.js.as" +
|
||||
"t.ExpressionH\000\022E\n\005empty\030\003 \001(\01324.org.jetb" +
|
||||
"rains.kotlin.serialization.js.ast.EmptyI" +
|
||||
"nitH\000\022H\n\tcondition\030\004 \001(\01325.org.jetbrains" +
|
||||
"rialization.js.ast.Statement\022\016\n\006fileId\030\003" +
|
||||
" \001(\005\022E\n\010location\030\004 \001(\01323.org.jetbrains.k" +
|
||||
"otlin.serialization.js.ast.Location\"\225\001\n\005" +
|
||||
"While\022H\n\tcondition\030\001 \002(\01325.org.jetbrains" +
|
||||
".kotlin.serialization.js.ast.Expression\022" +
|
||||
"H\n\tincrement\030\005 \001(\01325.org.jetbrains.kotli" +
|
||||
"n.serialization.js.ast.Expression\022B\n\004bod" +
|
||||
"y\030\006 \002(\01324.org.jetbrains.kotlin.serializa",
|
||||
"tion.js.ast.StatementB\006\n\004init\"\013\n\tEmptyIn" +
|
||||
"it\"\374\001\n\005ForIn\022\020\n\006nameId\030\001 \001(\005H\000\022K\n\nexpres" +
|
||||
"sion\030\002 \001(\01325.org.jetbrains.kotlin.serial" +
|
||||
"ization.js.ast.ExpressionH\000\022G\n\010iterable\030" +
|
||||
"\003 \002(\01325.org.jetbrains.kotlin.serializati" +
|
||||
"on.js.ast.Expression\022B\n\004body\030\004 \002(\01324.org" +
|
||||
".jetbrains.kotlin.serialization.js.ast.S" +
|
||||
"tatementB\007\n\005value\"\337\001\n\003Try\022F\n\010tryBlock\030\001 " +
|
||||
"\002(\01324.org.jetbrains.kotlin.serialization" +
|
||||
".js.ast.Statement\022D\n\ncatchBlock\030\002 \001(\01320.",
|
||||
"org.jetbrains.kotlin.serialization.js.as" +
|
||||
"t.Catch\022J\n\014finallyBlock\030\003 \001(\01324.org.jetb" +
|
||||
"rains.kotlin.serialization.js.ast.Statem" +
|
||||
"ent\"\224\001\n\005Catch\022G\n\tparameter\030\001 \002(\01324.org.j" +
|
||||
"etbrains.kotlin.serialization.js.ast.Par" +
|
||||
"ameter\022B\n\004body\030\002 \002(\01324.org.jetbrains.kot" +
|
||||
"lin.serialization.js.ast.Statement\"\007\n\005Em" +
|
||||
"pty\"\327\005\n\010Fragment\022R\n\017imported_module\030\001 \003(" +
|
||||
"\01329.org.jetbrains.kotlin.serialization.j" +
|
||||
"s.ast.ImportedModule\022G\n\014import_entry\030\002 \003",
|
||||
"(\01321.org.jetbrains.kotlin.serialization." +
|
||||
"js.ast.Import\022Q\n\021declaration_block\030\003 \001(\013" +
|
||||
"26.org.jetbrains.kotlin.serialization.js" +
|
||||
".ast.GlobalBlock\022L\n\014export_block\030\004 \001(\01326" +
|
||||
".org.jetbrains.kotlin.serialization.js.a" +
|
||||
"st.GlobalBlock\022Q\n\021initializer_block\030\005 \001(" +
|
||||
"\01326.org.jetbrains.kotlin.serialization.j" +
|
||||
"s.ast.GlobalBlock\022L\n\014name_binding\030\006 \003(\0132" +
|
||||
"6.org.jetbrains.kotlin.serialization.js." +
|
||||
"ast.NameBinding\022J\n\013class_model\030\007 \003(\01325.o",
|
||||
"B\n\004body\030\002 \002(\01324.org.jetbrains.kotlin.ser" +
|
||||
"ialization.js.ast.Statement\"\227\001\n\007DoWhile\022" +
|
||||
"H\n\tcondition\030\001 \002(\01325.org.jetbrains.kotli" +
|
||||
"n.serialization.js.ast.Expression\022B\n\004bod",
|
||||
"y\030\002 \002(\01324.org.jetbrains.kotlin.serializa" +
|
||||
"tion.js.ast.Statement\"\304\003\n\003For\022I\n\tvariabl" +
|
||||
"es\030\001 \001(\01324.org.jetbrains.kotlin.serializ" +
|
||||
"ation.js.ast.StatementH\000\022K\n\nexpression\030\002" +
|
||||
" \001(\01325.org.jetbrains.kotlin.serializatio" +
|
||||
"n.js.ast.ExpressionH\000\022E\n\005empty\030\003 \001(\01324.o" +
|
||||
"rg.jetbrains.kotlin.serialization.js.ast" +
|
||||
".ClassModel\022P\n\021module_expression\030\010 \003(\01325" +
|
||||
".org.jetbrains.kotlin.serialization.js.a" +
|
||||
"st.Expression\022N\n\rinline_module\030\t \003(\01327.o" +
|
||||
".EmptyInitH\000\022H\n\tcondition\030\004 \001(\01325.org.je" +
|
||||
"tbrains.kotlin.serialization.js.ast.Expr" +
|
||||
"ession\022H\n\tincrement\030\005 \001(\01325.org.jetbrain",
|
||||
"s.kotlin.serialization.js.ast.Expression" +
|
||||
"\022B\n\004body\030\006 \002(\01324.org.jetbrains.kotlin.se" +
|
||||
"rialization.js.ast.StatementB\006\n\004init\"\013\n\t" +
|
||||
"EmptyInit\"\374\001\n\005ForIn\022\020\n\006nameId\030\001 \001(\005H\000\022K\n" +
|
||||
"\nexpression\030\002 \001(\01325.org.jetbrains.kotlin" +
|
||||
".serialization.js.ast.ExpressionH\000\022G\n\010it" +
|
||||
"erable\030\003 \002(\01325.org.jetbrains.kotlin.seri" +
|
||||
"alization.js.ast.Expression\022B\n\004body\030\004 \002(" +
|
||||
"\01324.org.jetbrains.kotlin.serialization.j" +
|
||||
"s.ast.StatementB\007\n\005value\"\337\001\n\003Try\022F\n\010tryB",
|
||||
"lock\030\001 \002(\01324.org.jetbrains.kotlin.serial" +
|
||||
"ization.js.ast.Statement\022D\n\ncatchBlock\030\002" +
|
||||
" \001(\01320.org.jetbrains.kotlin.serializatio" +
|
||||
"n.js.ast.Catch\022J\n\014finallyBlock\030\003 \001(\01324.o" +
|
||||
"rg.jetbrains.kotlin.serialization.js.ast" +
|
||||
".InlineModule\"\224\001\n\016ImportedModule\022\030\n\020exte" +
|
||||
"rnal_name_id\030\001 \002(\005\022\030\n\020internal_name_id\030\002" +
|
||||
" \002(\005\022N\n\017plain_reference\030\003 \001(\01325.org.jetb" +
|
||||
"rains.kotlin.serialization.js.ast.Expres" +
|
||||
"sion\"i\n\006Import\022\024\n\014signature_id\030\001 \002(\005\022I\n\n",
|
||||
"expression\030\002 \002(\01325.org.jetbrains.kotlin." +
|
||||
"serialization.js.ast.Expression\"3\n\013NameB" +
|
||||
"inding\022\024\n\014signature_id\030\001 \002(\005\022\016\n\006nameId\030\002" +
|
||||
" \002(\005\"\247\001\n\nClassModel\022\017\n\007name_id\030\001 \002(\005\022\025\n\r" +
|
||||
"super_name_id\030\002 \001(\005\022\031\n\021interface_name_id" +
|
||||
"\030\004 \003(\005\022V\n\026post_declaration_block\030\003 \001(\01326" +
|
||||
".org.jetbrains.kotlin.serialization.js.a" +
|
||||
"st.GlobalBlock\";\n\014InlineModule\022\024\n\014signat" +
|
||||
"ure_id\030\001 \002(\005\022\025\n\rexpression_id\030\002 \002(\005\"\034\n\013S" +
|
||||
"tringTable\022\r\n\005entry\030\001 \003(\t\"K\n\tNameTable\022>",
|
||||
"\n\005entry\030\001 \003(\0132/.org.jetbrains.kotlin.ser" +
|
||||
"ialization.js.ast.Name\"\263\001\n\004Name\022\021\n\ttempo" +
|
||||
"rary\030\001 \002(\010\022\022\n\nidentifier\030\002 \001(\005\022\025\n\rlocal_" +
|
||||
"name_id\030\003 \001(\005\022\027\n\010imported\030\004 \001(\010:\005false\022T" +
|
||||
"\n\020special_function\030\005 \001(\0162:.org.jetbrains" +
|
||||
".kotlin.serialization.js.ast.SpecialFunc" +
|
||||
"tion\"\346\001\n\005Chunk\022L\n\014string_table\030\001 \002(\01326.o" +
|
||||
".Statement\"\224\001\n\005Catch\022G\n\tparameter\030\001 \002(\0132" +
|
||||
"4.org.jetbrains.kotlin.serialization.js." +
|
||||
"ast.Parameter\022B\n\004body\030\002 \002(\01324.org.jetbra" +
|
||||
"ins.kotlin.serialization.js.ast.Statemen" +
|
||||
"t\"\007\n\005Empty\"\327\005\n\010Fragment\022R\n\017imported_modu",
|
||||
"le\030\001 \003(\01329.org.jetbrains.kotlin.serializ" +
|
||||
"ation.js.ast.ImportedModule\022G\n\014import_en" +
|
||||
"try\030\002 \003(\01321.org.jetbrains.kotlin.seriali" +
|
||||
"zation.js.ast.Import\022Q\n\021declaration_bloc" +
|
||||
"k\030\003 \001(\01326.org.jetbrains.kotlin.serializa" +
|
||||
"tion.js.ast.GlobalBlock\022L\n\014export_block\030" +
|
||||
"\004 \001(\01326.org.jetbrains.kotlin.serializati" +
|
||||
"on.js.ast.GlobalBlock\022Q\n\021initializer_blo" +
|
||||
"ck\030\005 \001(\01326.org.jetbrains.kotlin.serializ" +
|
||||
"ation.js.ast.GlobalBlock\022L\n\014name_binding",
|
||||
"\030\006 \003(\01326.org.jetbrains.kotlin.serializat" +
|
||||
"ion.js.ast.NameBinding\022J\n\013class_model\030\007 " +
|
||||
"\003(\01325.org.jetbrains.kotlin.serialization" +
|
||||
".js.ast.ClassModel\022P\n\021module_expression\030" +
|
||||
"\010 \003(\01325.org.jetbrains.kotlin.serializati" +
|
||||
"on.js.ast.Expression\022N\n\rinline_module\030\t " +
|
||||
"\003(\01327.org.jetbrains.kotlin.serialization" +
|
||||
".js.ast.InlineModule\"\224\001\n\016ImportedModule\022" +
|
||||
"\030\n\020external_name_id\030\001 \002(\005\022\030\n\020internal_na" +
|
||||
"me_id\030\002 \002(\005\022N\n\017plain_reference\030\003 \001(\01325.o",
|
||||
"rg.jetbrains.kotlin.serialization.js.ast" +
|
||||
".StringTable\022H\n\nname_table\030\002 \002(\01324.org.j" +
|
||||
"etbrains.kotlin.serialization.js.ast.Nam",
|
||||
"eTable\022E\n\010fragment\030\003 \002(\01323.org.jetbrains" +
|
||||
".kotlin.serialization.js.ast.Fragment*@\n" +
|
||||
"\013SideEffects\022\021\n\rAFFECTS_STATE\020\001\022\024\n\020DEPEN" +
|
||||
"DS_ON_STATE\020\002\022\010\n\004PURE\020\003*?\n\016InlineStrateg" +
|
||||
"y\022\017\n\013AS_FUNCTION\020\000\022\014\n\010IN_PLACE\020\001\022\016\n\nNOT_" +
|
||||
"INLINE\020\002*\327\001\n\017SpecialFunction\022\032\n\026DEFINE_I" +
|
||||
"NLINE_FUNCTION\020\001\022\021\n\rWRAP_FUNCTION\020\002\022\021\n\rT" +
|
||||
"O_BOXED_CHAR\020\003\022\016\n\nUNBOX_CHAR\020\004\022\020\n\014SUSPEN" +
|
||||
"D_CALL\020\005\022\024\n\020COROUTINE_RESULT\020\006\022\030\n\024COROUT" +
|
||||
"INE_CONTROLLER\020\007\022\026\n\022COROUTINE_RECEIVER\020\010",
|
||||
"\022\030\n\024SET_COROUTINE_RESULT\020\tB\024B\022DebugJsAst" +
|
||||
"ProtoBuf"
|
||||
".Expression\"i\n\006Import\022\024\n\014signature_id\030\001 " +
|
||||
"\002(\005\022I\n\nexpression\030\002 \002(\01325.org.jetbrains." +
|
||||
"kotlin.serialization.js.ast.Expression\"3" +
|
||||
"\n\013NameBinding\022\024\n\014signature_id\030\001 \002(\005\022\016\n\006n" +
|
||||
"ameId\030\002 \002(\005\"\247\001\n\nClassModel\022\017\n\007name_id\030\001 " +
|
||||
"\002(\005\022\025\n\rsuper_name_id\030\002 \001(\005\022\031\n\021interface_" +
|
||||
"name_id\030\004 \003(\005\022V\n\026post_declaration_block\030" +
|
||||
"\003 \001(\01326.org.jetbrains.kotlin.serializati" +
|
||||
"on.js.ast.GlobalBlock\";\n\014InlineModule\022\024\n",
|
||||
"\014signature_id\030\001 \002(\005\022\025\n\rexpression_id\030\002 \002" +
|
||||
"(\005\"\034\n\013StringTable\022\r\n\005entry\030\001 \003(\t\"K\n\tName" +
|
||||
"Table\022>\n\005entry\030\001 \003(\0132/.org.jetbrains.kot" +
|
||||
"lin.serialization.js.ast.Name\"\263\001\n\004Name\022\021" +
|
||||
"\n\ttemporary\030\001 \002(\010\022\022\n\nidentifier\030\002 \001(\005\022\025\n" +
|
||||
"\rlocal_name_id\030\003 \001(\005\022\027\n\010imported\030\004 \001(\010:\005" +
|
||||
"false\022T\n\020special_function\030\005 \001(\0162:.org.je" +
|
||||
"tbrains.kotlin.serialization.js.ast.Spec" +
|
||||
"ialFunction\"\346\001\n\005Chunk\022L\n\014string_table\030\001 " +
|
||||
"\002(\01326.org.jetbrains.kotlin.serialization",
|
||||
".js.ast.StringTable\022H\n\nname_table\030\002 \002(\0132" +
|
||||
"4.org.jetbrains.kotlin.serialization.js." +
|
||||
"ast.NameTable\022E\n\010fragment\030\003 \002(\01323.org.je" +
|
||||
"tbrains.kotlin.serialization.js.ast.Frag" +
|
||||
"ment*@\n\013SideEffects\022\021\n\rAFFECTS_STATE\020\001\022\024" +
|
||||
"\n\020DEPENDS_ON_STATE\020\002\022\010\n\004PURE\020\003*?\n\016Inline" +
|
||||
"Strategy\022\017\n\013AS_FUNCTION\020\000\022\014\n\010IN_PLACE\020\001\022" +
|
||||
"\016\n\nNOT_INLINE\020\002*\327\001\n\017SpecialFunction\022\032\n\026D" +
|
||||
"EFINE_INLINE_FUNCTION\020\001\022\021\n\rWRAP_FUNCTION" +
|
||||
"\020\002\022\021\n\rTO_BOXED_CHAR\020\003\022\016\n\nUNBOX_CHAR\020\004\022\020\n",
|
||||
"\014SUSPEND_CALL\020\005\022\024\n\020COROUTINE_RESULT\020\006\022\030\n" +
|
||||
"\024COROUTINE_CONTROLLER\020\007\022\026\n\022COROUTINE_REC" +
|
||||
"EIVER\020\010\022\030\n\024SET_COROUTINE_RESULT\020\tB\024B\022Deb" +
|
||||
"ugJsAstProtoBuf"
|
||||
};
|
||||
org.jetbrains.kotlin.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
|
||||
new org.jetbrains.kotlin.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
|
||||
@@ -49803,7 +50084,7 @@ public final class DebugJsAstProtoBuf {
|
||||
internal_static_org_jetbrains_kotlin_serialization_js_ast_SwitchEntry_fieldAccessorTable = new
|
||||
org.jetbrains.kotlin.protobuf.GeneratedMessage.FieldAccessorTable(
|
||||
internal_static_org_jetbrains_kotlin_serialization_js_ast_SwitchEntry_descriptor,
|
||||
new java.lang.String[] { "Label", "Statement", });
|
||||
new java.lang.String[] { "Label", "Statement", "FileId", "Location", });
|
||||
internal_static_org_jetbrains_kotlin_serialization_js_ast_While_descriptor =
|
||||
getDescriptor().getMessageTypes().get(37);
|
||||
internal_static_org_jetbrains_kotlin_serialization_js_ast_While_fieldAccessorTable = new
|
||||
|
||||
@@ -314,6 +314,9 @@ message Switch {
|
||||
message SwitchEntry {
|
||||
optional Expression label = 1;
|
||||
repeated Statement statement = 2;
|
||||
|
||||
optional int32 fileId = 3;
|
||||
optional Location location = 4;
|
||||
}
|
||||
|
||||
message While {
|
||||
|
||||
+10
-5
@@ -190,11 +190,16 @@ class JsAstDeserializer(program: JsProgram, private val sourceRoots: Iterable<Fi
|
||||
JsSwitch(
|
||||
deserialize(switchProto.expression),
|
||||
switchProto.entryList.map { entryProto ->
|
||||
val member = if (entryProto.hasLabel()) {
|
||||
JsCase().apply { caseExpression = deserialize(entryProto.label) }
|
||||
}
|
||||
else {
|
||||
JsDefault()
|
||||
val member = withLocation(
|
||||
fileId = if (entryProto.hasFileId()) entryProto.fileId else null,
|
||||
location = if (entryProto.hasLocation()) entryProto.location else null
|
||||
) {
|
||||
if (entryProto.hasLabel()) {
|
||||
JsCase().apply { caseExpression = deserialize(entryProto.label) }
|
||||
}
|
||||
else {
|
||||
JsDefault()
|
||||
}
|
||||
}
|
||||
member.statements += entryProto.statementList.map { deserialize(it) }
|
||||
member
|
||||
|
||||
@@ -24128,6 +24128,24 @@ public final class JsAstProtoBuf {
|
||||
* <code>repeated .org.jetbrains.kotlin.serialization.js.ast.Statement statement = 2;</code>
|
||||
*/
|
||||
int getStatementCount();
|
||||
|
||||
/**
|
||||
* <code>optional int32 fileId = 3;</code>
|
||||
*/
|
||||
boolean hasFileId();
|
||||
/**
|
||||
* <code>optional int32 fileId = 3;</code>
|
||||
*/
|
||||
int getFileId();
|
||||
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.serialization.js.ast.Location location = 4;</code>
|
||||
*/
|
||||
boolean hasLocation();
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.serialization.js.ast.Location location = 4;</code>
|
||||
*/
|
||||
org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.Location getLocation();
|
||||
}
|
||||
/**
|
||||
* Protobuf type {@code org.jetbrains.kotlin.serialization.js.ast.SwitchEntry}
|
||||
@@ -24200,6 +24218,24 @@ public final class JsAstProtoBuf {
|
||||
statement_.add(input.readMessage(org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.Statement.PARSER, extensionRegistry));
|
||||
break;
|
||||
}
|
||||
case 24: {
|
||||
bitField0_ |= 0x00000002;
|
||||
fileId_ = input.readInt32();
|
||||
break;
|
||||
}
|
||||
case 34: {
|
||||
org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.Location.Builder subBuilder = null;
|
||||
if (((bitField0_ & 0x00000004) == 0x00000004)) {
|
||||
subBuilder = location_.toBuilder();
|
||||
}
|
||||
location_ = input.readMessage(org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.Location.PARSER, extensionRegistry);
|
||||
if (subBuilder != null) {
|
||||
subBuilder.mergeFrom(location_);
|
||||
location_ = subBuilder.buildPartial();
|
||||
}
|
||||
bitField0_ |= 0x00000004;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
|
||||
@@ -24287,9 +24323,41 @@ public final class JsAstProtoBuf {
|
||||
return statement_.get(index);
|
||||
}
|
||||
|
||||
public static final int FILEID_FIELD_NUMBER = 3;
|
||||
private int fileId_;
|
||||
/**
|
||||
* <code>optional int32 fileId = 3;</code>
|
||||
*/
|
||||
public boolean hasFileId() {
|
||||
return ((bitField0_ & 0x00000002) == 0x00000002);
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 fileId = 3;</code>
|
||||
*/
|
||||
public int getFileId() {
|
||||
return fileId_;
|
||||
}
|
||||
|
||||
public static final int LOCATION_FIELD_NUMBER = 4;
|
||||
private org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.Location location_;
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.serialization.js.ast.Location location = 4;</code>
|
||||
*/
|
||||
public boolean hasLocation() {
|
||||
return ((bitField0_ & 0x00000004) == 0x00000004);
|
||||
}
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.serialization.js.ast.Location location = 4;</code>
|
||||
*/
|
||||
public org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.Location getLocation() {
|
||||
return location_;
|
||||
}
|
||||
|
||||
private void initFields() {
|
||||
label_ = org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.Expression.getDefaultInstance();
|
||||
statement_ = java.util.Collections.emptyList();
|
||||
fileId_ = 0;
|
||||
location_ = org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.Location.getDefaultInstance();
|
||||
}
|
||||
private byte memoizedIsInitialized = -1;
|
||||
public final boolean isInitialized() {
|
||||
@@ -24309,6 +24377,12 @@ public final class JsAstProtoBuf {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (hasLocation()) {
|
||||
if (!getLocation().isInitialized()) {
|
||||
memoizedIsInitialized = 0;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
memoizedIsInitialized = 1;
|
||||
return true;
|
||||
}
|
||||
@@ -24322,6 +24396,12 @@ public final class JsAstProtoBuf {
|
||||
for (int i = 0; i < statement_.size(); i++) {
|
||||
output.writeMessage(2, statement_.get(i));
|
||||
}
|
||||
if (((bitField0_ & 0x00000002) == 0x00000002)) {
|
||||
output.writeInt32(3, fileId_);
|
||||
}
|
||||
if (((bitField0_ & 0x00000004) == 0x00000004)) {
|
||||
output.writeMessage(4, location_);
|
||||
}
|
||||
output.writeRawBytes(unknownFields);
|
||||
}
|
||||
|
||||
@@ -24339,6 +24419,14 @@ public final class JsAstProtoBuf {
|
||||
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
||||
.computeMessageSize(2, statement_.get(i));
|
||||
}
|
||||
if (((bitField0_ & 0x00000002) == 0x00000002)) {
|
||||
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
||||
.computeInt32Size(3, fileId_);
|
||||
}
|
||||
if (((bitField0_ & 0x00000004) == 0x00000004)) {
|
||||
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
||||
.computeMessageSize(4, location_);
|
||||
}
|
||||
size += unknownFields.size();
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
@@ -24437,6 +24525,10 @@ public final class JsAstProtoBuf {
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
statement_ = java.util.Collections.emptyList();
|
||||
bitField0_ = (bitField0_ & ~0x00000002);
|
||||
fileId_ = 0;
|
||||
bitField0_ = (bitField0_ & ~0x00000004);
|
||||
location_ = org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.Location.getDefaultInstance();
|
||||
bitField0_ = (bitField0_ & ~0x00000008);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -24469,6 +24561,14 @@ public final class JsAstProtoBuf {
|
||||
bitField0_ = (bitField0_ & ~0x00000002);
|
||||
}
|
||||
result.statement_ = statement_;
|
||||
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
|
||||
to_bitField0_ |= 0x00000002;
|
||||
}
|
||||
result.fileId_ = fileId_;
|
||||
if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
|
||||
to_bitField0_ |= 0x00000004;
|
||||
}
|
||||
result.location_ = location_;
|
||||
result.bitField0_ = to_bitField0_;
|
||||
return result;
|
||||
}
|
||||
@@ -24488,6 +24588,12 @@ public final class JsAstProtoBuf {
|
||||
}
|
||||
|
||||
}
|
||||
if (other.hasFileId()) {
|
||||
setFileId(other.getFileId());
|
||||
}
|
||||
if (other.hasLocation()) {
|
||||
mergeLocation(other.getLocation());
|
||||
}
|
||||
setUnknownFields(
|
||||
getUnknownFields().concat(other.unknownFields));
|
||||
return this;
|
||||
@@ -24506,6 +24612,12 @@ public final class JsAstProtoBuf {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (hasLocation()) {
|
||||
if (!getLocation().isInitialized()) {
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -24713,6 +24825,98 @@ public final class JsAstProtoBuf {
|
||||
return this;
|
||||
}
|
||||
|
||||
private int fileId_ ;
|
||||
/**
|
||||
* <code>optional int32 fileId = 3;</code>
|
||||
*/
|
||||
public boolean hasFileId() {
|
||||
return ((bitField0_ & 0x00000004) == 0x00000004);
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 fileId = 3;</code>
|
||||
*/
|
||||
public int getFileId() {
|
||||
return fileId_;
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 fileId = 3;</code>
|
||||
*/
|
||||
public Builder setFileId(int value) {
|
||||
bitField0_ |= 0x00000004;
|
||||
fileId_ = value;
|
||||
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 fileId = 3;</code>
|
||||
*/
|
||||
public Builder clearFileId() {
|
||||
bitField0_ = (bitField0_ & ~0x00000004);
|
||||
fileId_ = 0;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
private org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.Location location_ = org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.Location.getDefaultInstance();
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.serialization.js.ast.Location location = 4;</code>
|
||||
*/
|
||||
public boolean hasLocation() {
|
||||
return ((bitField0_ & 0x00000008) == 0x00000008);
|
||||
}
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.serialization.js.ast.Location location = 4;</code>
|
||||
*/
|
||||
public org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.Location getLocation() {
|
||||
return location_;
|
||||
}
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.serialization.js.ast.Location location = 4;</code>
|
||||
*/
|
||||
public Builder setLocation(org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.Location value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
location_ = value;
|
||||
|
||||
bitField0_ |= 0x00000008;
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.serialization.js.ast.Location location = 4;</code>
|
||||
*/
|
||||
public Builder setLocation(
|
||||
org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.Location.Builder builderForValue) {
|
||||
location_ = builderForValue.build();
|
||||
|
||||
bitField0_ |= 0x00000008;
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.serialization.js.ast.Location location = 4;</code>
|
||||
*/
|
||||
public Builder mergeLocation(org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.Location value) {
|
||||
if (((bitField0_ & 0x00000008) == 0x00000008) &&
|
||||
location_ != org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.Location.getDefaultInstance()) {
|
||||
location_ =
|
||||
org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.Location.newBuilder(location_).mergeFrom(value).buildPartial();
|
||||
} else {
|
||||
location_ = value;
|
||||
}
|
||||
|
||||
bitField0_ |= 0x00000008;
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.serialization.js.ast.Location location = 4;</code>
|
||||
*/
|
||||
public Builder clearLocation() {
|
||||
location_ = org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.Location.getDefaultInstance();
|
||||
|
||||
bitField0_ = (bitField0_ & ~0x00000008);
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.serialization.js.ast.SwitchEntry)
|
||||
}
|
||||
|
||||
|
||||
@@ -196,6 +196,7 @@ class JsAstSerializer(private val pathResolver: (File) -> String) {
|
||||
switchBuilder.expression = serialize(x.expression)
|
||||
for (case in x.cases) {
|
||||
val entryBuilder = SwitchEntry.newBuilder()
|
||||
withLocation(case, { entryBuilder.fileId = it }, { entryBuilder.location = it }) {}
|
||||
if (case is JsCase) {
|
||||
entryBuilder.label = serialize(case.caseExpression)
|
||||
}
|
||||
@@ -263,7 +264,7 @@ class JsAstSerializer(private val pathResolver: (File) -> String) {
|
||||
}
|
||||
}
|
||||
|
||||
withLocation(statement, { visitor.builder.fileId = it }, {visitor.builder.location = it }) {
|
||||
withLocation(statement, { visitor.builder.fileId = it }, { visitor.builder.location = it }) {
|
||||
statement.accept(visitor)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user