//% descriptor: true
syntax = "proto2";

package buf.test;

import "google/protobuf/descriptor.proto";

option (x) = {
    [x] {}
    [buf.test.x] {}
    (buf.test.x) {}
    "buf.test.x" {}
    [.buf.test.x] {}

    [y]: 0,
    "y": 0,
    [Foo.y]: 0,
    Foo.y: 0,
    ["Foo.y"]: 0,
    "Foo.y": 0,

    1: 0,
    1000: 1,

    [z]: 0,
    [Foo.z]: 1,
    (Foo.z): 1,
    ["Foo.z"]: 1,
    Foo.z: 1,
    "Foo.z": 1,
    [buf.test.Foo.z]: 2,
    [.buf.test.Foo.z]: 3,
};

message Foo {
    optional int32 y = 1;

    extensions 1000;
    extend Foo {
        optional int32 z = 1000;
    }
}

extend google.protobuf.FileOptions {
    optional Foo x = 1000;
}