Skip to content

Commit

Permalink
💡 Documenting source code.
Browse files Browse the repository at this point in the history
  • Loading branch information
crossoverJie committed Oct 13, 2022
1 parent 6679cd7 commit 214169e
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 12 deletions.
18 changes: 8 additions & 10 deletions byte_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,17 +80,15 @@ sb.grow(15);
}
func TestStringBuilder6(t *testing.T) {
script := `
string join(string[] elems, string sep){
string[] remain = elems[1:2];
return "";
}
string[] list ={"1","2"};
join(list,"&");
//println(s);
Strings s = Strings();
bool b = s.hasPrefix("http://www.xx.com", "http");
println(b);
assertEqual(b,true);
b = s.hasPrefix("http://www.xx.com", "https");
println(b);
assertEqual(b,false);
`
NewCompiler().CompilerWithoutNative(script)
NewCompiler().Compiler(script)
}
func TestArraySlice(t *testing.T) {
script := `
Expand Down
2 changes: 1 addition & 1 deletion internal/internal.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func internal_internal_go() ([]byte, error) {
)
}

var _internal_internal_gs = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xcc\x58\x4f\x6f\xdc\xb8\x15\xbf\xcf\xa7\x78\x1d\xa0\x8b\x99\xb5\x77\x6c\xef\xa1\x05\xd6\xab\x02\x71\xba\x89\xb1\xc8\x26\xa9\xed\xb6\x07\xc3\x07\x4a\x7a\x33\xc3\x58\x22\x15\x92\x1a\x7b\x6c\x0c\x50\xb4\xa7\x9e\x16\x68\xd1\x0f\x50\xa0\x87\xf6\xd2\x4b\x7b\xe9\xa5\xdf\x26\xc1\xf6\x5b\x14\x8f\xa4\x24\x8a\x92\x37\x4e\x7b\xd9\x1c\x1c\x0d\xf9\xfe\xfc\xde\x7b\x3f\xf2\x91\x3c\x38\x00\x85\xa6\x56\x02\x98\x52\x6c\x0b\x05\x8a\x95\x59\x4f\xb8\x30\xf4\x39\x63\x62\x7b\x79\x05\x6c\x7e\xbf\x9b\x4c\x62\xd1\x8c\x55\x56\x2e\x63\x55\x2c\xe7\xc6\x65\xb5\x9d\xa5\x5b\x83\x97\x57\x90\x6b\xb3\x0f\xfe\x5b\xab\x2c\xb2\xb7\x66\x7a\x9d\xc9\x1c\xad\x1a\xfd\x20\x7b\xa0\xad\x54\xa5\xb8\x30\x85\x45\xd2\xda\x5f\x4a\x55\x32\xa3\x81\x65\x99\x54\x39\x17\x2b\x30\x12\x18\xb8\x61\xd0\x15\x66\x7c\xc9\x51\x01\x13\x39\xdc\x28\x6e\x50\x93\x80\x36\x4c\xe4\x4c\xe5\x20\x6b\x53\xd5\x66\xe1\x4c\x2f\x67\xda\x28\x32\xe1\xb4\xf7\x81\x1c\x2d\x16\x8b\xff\xc5\x97\x0b\x47\x83\x59\x23\x28\xd4\x75\x61\x48\xde\xd9\x5f\x4c\xbc\x1f\xfd\x28\xb7\xd0\xf8\xad\xb5\xf5\xb9\x46\xc8\x71\xc9\xea\xc2\xb4\x33\x4b\xa9\x80\x1b\x0d\xb2\x42\xc5\x44\xae\x1f\x15\xee\xac\xe7\x87\x69\x8d\xca\x7c\xf5\xb6\x66\x85\x4b\xf0\x91\x03\xc2\x3e\x6f\x60\x64\x72\x83\xca\xf8\x18\xc8\x2c\x15\xd1\x11\x60\x31\xf1\x05\x35\xf2\x64\x6b\xf0\x09\x8d\x35\x51\xd9\xda\x75\xea\x9d\x92\x43\xd6\x4b\x88\x91\xe7\xf6\xa3\xe1\x4a\x4a\xba\x59\xc1\xb4\x06\x37\x71\x52\xf3\x22\x47\x75\x3f\x01\x80\x86\x44\x69\xbd\x84\x04\x2e\x0f\xaf\xee\x77\xc7\x13\x3b\x71\x70\x00\xac\xaa\x50\xe4\x90\x49\x61\x50\xd8\x24\xa4\xf5\x72\x1f\xb8\xe9\x55\xc6\x51\x1c\xe4\x12\xb4\x55\x24\xd2\xd9\xb4\x79\x18\x5d\x08\x76\x3a\x70\x6a\xb0\xac\x20\xe9\xc7\x3b\x3f\x6e\xa5\x9c\xfb\x99\xf5\x49\xa2\xc1\x94\x27\x3a\x2d\xa9\x60\x66\x67\xff\x46\xe8\xd3\x0f\xe3\x4e\x17\x2d\xf0\x5f\x13\x70\x82\xa3\x83\xf4\x8d\x22\x4a\xc7\xe1\xa4\x2d\x16\xfb\xdf\x4a\xc9\x9b\x19\x19\x16\x81\x19\xbe\x84\x99\x80\x9f\xc1\xe1\x1c\xba\x41\x8f\xfa\x66\x8d\x82\xe0\x29\x04\xae\x41\x48\x03\x28\x64\xbd\x5a\x83\xae\x58\x46\xa0\x97\x66\xd1\xd3\x21\x63\xb4\x65\xa4\xf5\x72\x0e\x9f\x39\x0c\xf4\xf9\x25\x88\xd8\x7c\x90\x7a\x81\x37\x27\xae\xe4\x8d\xc2\x3e\x7c\xfe\x69\x63\x67\x4f\x58\x1e\xc4\xba\x76\x07\x72\x9a\xfb\x94\xd2\xf9\x50\xc4\xf1\xc8\xc9\xf4\x67\x77\xed\xaf\x5d\x53\x24\x9f\x23\x4f\x10\x4f\x97\x20\x4f\x3e\xad\x1d\xa1\x5b\x97\xbb\xc9\x6e\xd2\xe3\xb4\xbe\x0f\x4d\xbd\x91\x5c\x78\xde\x5d\x5e\x01\x16\x58\xea\xfd\x66\x4e\x63\x15\x95\x82\x32\x60\x65\xe6\x90\x24\xc3\xa2\x78\x14\xd3\x69\x17\xcf\xee\x7b\xf4\x8f\x1e\xd0\xb7\x12\x97\x87\x57\x63\x56\xe2\x85\x91\xea\x78\x59\x60\xc8\x7e\xcb\x27\x48\x5c\xad\xf5\x1c\x3e\xed\x61\xf8\xec\x28\x10\xa5\x4d\xcd\xf2\x8f\x27\x87\xc7\xc0\xe1\x4b\xe8\x24\x8f\x81\xef\xed\xc5\x68\x9b\x2c\x41\xe2\x11\xf3\xab\x7e\x1d\x1f\x84\x18\xb1\x81\x00\x0a\xd8\x6b\x40\x7e\x6f\xd8\xbd\x7d\x09\x74\x0a\x49\x7f\x68\x16\xa8\xeb\x74\x61\x17\x95\x08\xc7\xfc\xde\xcf\x95\x36\x2d\xf0\x30\xd5\x3a\x5d\x84\x5b\x92\x15\x9c\xfb\x8d\xae\x33\x70\x79\x05\x0a\x4b\xc6\x45\x6b\xe3\xe8\x8b\x2e\x5d\x57\xbd\xac\x0e\x93\xea\x54\x7d\x56\xa3\xa4\xf6\xdd\xf7\xab\x19\x04\xa0\x20\xf1\x08\x06\x69\x8f\x4c\xa8\xd1\x84\x7a\xaa\xe9\x74\xd1\x2c\x26\x1f\xa3\x5d\x2f\xed\x9e\xa8\x61\xba\x99\xd2\xb6\x48\xdb\x20\xed\x91\x72\x09\xcc\xf7\x93\x29\x9b\x4e\xfc\x36\xe7\x0f\x21\xae\x85\x6d\xa2\x33\xc6\xd7\xe7\xaf\x5e\x7a\xd8\x4d\xe3\xa1\xa1\xde\xb9\xc2\x09\xbd\xad\x51\x6d\xe1\x86\x9b\x35\x54\xcc\xac\x27\x24\x41\x13\xcf\xd1\x34\xbd\xe1\x8d\x96\xa2\x5d\xa0\x24\x64\x0d\x90\x85\xd3\x8b\x8b\xd7\x50\xf0\x94\xbe\xcf\x50\x57\x52\x68\xb4\xe2\x93\x67\xae\xef\x5b\xa7\xee\x78\x94\x63\xcf\x46\xfb\x83\xc4\x7d\xff\x3c\x43\x6d\x2d\xac\x4d\x59\x34\x16\x4e\x2f\xbe\x79\xf1\x01\x0b\x24\xde\xc4\x44\x13\x30\x53\x58\x30\xc3\x37\x68\x7f\x6a\x28\xd9\x16\x64\xc9\xe9\x90\xc7\xec\xa1\x46\x17\x4c\xaf\xe7\x4d\x66\x7e\x41\x29\x78\xcd\xcc\x7a\x16\xc7\xd8\x26\xd4\xf5\x24\xc7\xe0\x0d\x2b\x6a\xb4\x4b\x97\xc6\x04\x2b\x91\x9a\x70\x59\x49\x81\xc2\x50\xb1\x68\xd8\xa6\xb5\x6d\xfa\xcf\xa4\x2a\x7f\x45\x6a\xb3\x31\xfc\xd7\xb8\xfd\x3f\xbd\xbd\x7e\x75\x7e\xd1\xf8\x7a\x2d\xb5\xf9\x48\x7f\xa0\xf0\x6d\x8d\xda\x80\x62\x37\x90\xca\x7c\xdb\xd8\x3a\x73\xe3\x27\x32\xdf\x0e\x72\xe3\xf6\xf7\x53\x63\xaa\xa7\x74\x02\xb9\x35\xbd\x3d\x9e\xc4\xdc\x1a\x88\x28\xe0\xd9\x1a\x6f\x0e\xc4\x02\x48\x9c\xf0\x26\x58\x3d\x21\x8f\x9c\x01\x17\x8a\x65\x4d\x78\xae\x88\x78\xe2\xdc\xc0\xc0\x0f\x71\x05\x12\xd8\x0c\x3c\x58\xfd\xd0\x83\x65\x55\xe8\xc1\x5b\x78\xdb\xb2\x65\xc4\x3c\x1d\x98\x3a\x3a\xd9\x5c\x0d\xce\x21\xd5\xf1\x48\x7b\x5d\xc6\x15\xb3\x45\x8a\xcd\x6f\x20\x09\xb8\xe4\x70\x92\xe0\xc0\xc7\x66\xcc\x47\x35\xc6\x8c\x07\xfd\xf4\x79\xf4\x08\x5f\xf4\xa7\xe7\x4f\x05\xec\x19\xfa\x20\x9e\x41\xd2\xa3\xd8\x78\xbe\x48\xb0\x3b\x57\x1c\x1c\xc0\x09\xa7\xdb\x87\xac\x0d\x4e\xd6\xc6\x54\xa7\x4c\xe4\x45\x1b\x4f\x89\x66\x2d\xf3\x68\xa3\x58\xd6\x22\x83\x59\xc0\xd5\x39\xac\xad\x96\x87\x45\x1b\x87\xbf\x79\x4d\x49\x23\x99\xee\x05\x58\x02\x3d\xc8\xcc\x2d\x24\xe1\x48\xd3\xfc\x9c\xbd\x59\x66\x6e\xe7\xc7\x0e\xe6\x59\x2d\x80\xf0\x81\x46\xb5\x41\xb5\xb0\x60\xcf\xea\xe6\xe8\x03\x2c\xcf\x55\xb3\x0e\xcf\xb7\xda\x60\x09\x52\x03\xab\xf8\xa4\xed\x77\xcf\xd1\xbc\x3a\x7f\xa2\x56\x7a\x46\x82\x5e\xef\xa9\x2c\x4b\x26\xf2\xc6\x0c\x6d\x09\x6d\xb8\x74\xd7\x51\x2b\x12\xb6\x47\xe5\x67\xbc\x4b\xcc\x92\x17\xf8\x32\x94\xb5\x3b\xcb\xbe\x3d\xae\x54\xa8\x4a\x52\x3a\xc3\x52\x6e\x06\x1a\x81\xef\xe7\x68\x6e\xf2\x59\xbb\xff\xeb\x1e\x6c\x7f\xe2\xb3\x63\xf7\xed\x35\xe5\x39\x1a\x2b\xa0\x56\x7a\x31\xe9\x75\xf3\x55\x10\x5d\x5c\xf4\x20\xf2\x91\x35\x98\x3d\x22\x05\xb1\xc5\x26\x6d\x4e\x98\x44\x42\xc3\xd4\x7d\x8d\x41\x61\xb8\x14\x5f\xd8\x7c\xd0\x01\xdf\x5d\x44\x33\x5e\xb2\xc2\x4a\xdd\x7c\x7c\x52\x5b\x18\x5d\x41\x3a\x25\x2f\x6d\x25\x23\x34\xca\x96\x42\x07\xbb\x3e\xa9\x4d\x5c\x40\xe3\x55\x6a\x5d\xf9\x32\xb6\x33\x03\xd3\xae\xc9\x30\x50\x52\x1a\xcc\x5d\xd3\x24\x27\x90\x49\xa5\x6c\x1f\x6f\xee\xfe\xe4\x3e\xab\x95\xa2\x66\x93\x73\x85\x99\x91\xd4\xd7\x82\x5a\xac\x3c\x25\x46\x2a\x48\xe3\xc7\xbd\x13\xce\xcf\x99\xc1\x80\x4b\x4f\x9d\xe5\x0b\x5e\xb6\xe1\x98\xbb\x36\x97\x05\xdb\xca\xda\x58\xb2\x51\x3e\x7f\x29\xf8\x6d\x27\x15\xf4\x20\x32\x4a\x26\xee\x23\x58\x8f\xb3\x3e\x82\x3b\x54\x24\x0d\x2f\x1a\xa6\x91\x00\xd5\x11\xa0\xd8\x92\x05\x6c\xee\xa2\x14\x3c\x95\x65\xc5\x0b\x54\xc1\x4a\x87\xbc\x2e\xab\x27\xe7\x17\xb3\x96\xde\x79\xb8\xe8\x68\xf6\x7c\x5b\xa6\xb2\x88\x05\x7c\x02\xbe\x12\x46\x6d\x9d\x7b\xea\x7b\xd7\xb8\xdd\xb7\xcc\x72\x8e\xed\x2c\x08\xbc\x35\xc1\x6f\x7b\x12\xbc\xf6\x7d\x72\xbf\x91\x09\x62\xb8\xc6\x6d\x72\xdd\xed\xc5\xd6\x5e\x12\xb4\x4d\xb2\x97\x88\x2e\x34\x87\xe4\x1b\x56\xdd\x77\x4e\x2e\xaf\xc0\xb0\xb4\x40\xba\xc8\x1e\xfd\xa4\xbd\xb4\x52\xee\x34\xbf\xc3\xe4\xd0\x9f\x7f\xab\xda\xbd\xd4\x10\x70\x87\x88\xbc\x05\x60\x0e\x0e\xc0\xc8\x5c\x42\xa6\xa4\xd6\x72\x83\xea\x6b\x8e\xf0\xfe\xf7\x7f\x7b\xf7\xf7\x7f\x05\x77\xbd\x19\x61\x4e\xa6\xd3\xf9\xd8\x0d\x6f\xf4\x7a\xe8\x1f\xe0\x28\x9d\x90\xb8\xb7\xb8\x7e\x8b\xb3\xd7\x08\x3f\x65\xa5\x7e\xec\x5e\x35\x28\xaa\x39\x74\x72\x2e\x7f\x64\xc4\x4e\xf5\xee\x07\x74\x09\x45\xf8\x51\x02\x82\x17\x11\x34\xa7\x66\xb0\xac\xdc\x57\x02\xd8\xbf\x57\xd8\x0b\x62\x37\xef\x8d\x8c\x3c\x1c\xd8\x93\x8f\xa3\xed\x29\xd3\xeb\x26\x9a\x56\x75\xd1\x8f\x2b\xc4\xd6\x53\x0b\x42\xfd\xe4\x13\x2a\x08\x0d\xf5\xad\x0c\x9d\xd3\xbf\x4e\xc6\x51\x05\x02\x06\xc6\xff\xe2\x8a\x0c\x2b\x33\xb0\x0a\x21\x8a\x8e\xcb\xe3\x9a\x4d\x0d\x20\xf1\x64\xb7\xc4\xf2\x9b\x2d\xc6\x97\x3b\x7e\x87\x7b\x7b\xc1\x6d\x73\x07\x58\x68\x1c\xbe\xfd\xbc\xfb\xf6\xb7\xdf\xfd\xe6\x77\xf0\x26\xbf\x3e\x5a\xfc\x14\xfe\xf3\xc7\x7f\x7f\xf7\xe7\xbf\xbe\xfb\xcb\x3f\xdf\x7f\xfb\x87\xf7\xff\xf8\xd3\x87\xfd\x3b\xf7\x54\xbe\x71\xff\x5d\x28\xe1\xd1\x8d\x56\xc3\x0a\xdb\xe5\xd1\x7b\x1b\xf9\x81\xf2\xdd\x72\x16\x6d\x91\xc6\x59\xff\x00\x57\x71\x84\xa3\xc4\x4f\x4f\x42\x3b\x4d\xa4\x7c\x80\xaf\x23\xbc\x6c\xde\x76\x16\x23\x5c\xec\x33\x86\x22\xc1\x88\x57\xfd\x67\xa4\x00\x62\x6f\x95\x04\xcb\x04\x47\x96\xc7\x43\x10\x76\x23\x1c\xf3\xb2\x82\x17\x31\x08\x4f\x06\x4a\xdc\x0a\xcd\x39\xbf\xc3\x91\x86\x4b\x44\x0a\x5a\x0d\xf5\x9a\x17\x5c\x5c\x63\xfe\x82\x6b\xe3\xf7\x67\x37\xf0\x52\xe6\xd8\xb5\x8b\x00\x59\x37\x1d\xf4\x8b\x6e\x70\x16\x5f\xde\xdc\xe5\xb4\x77\x9d\xb2\x65\x4f\xba\x20\xba\xde\xd0\x81\xb9\x8f\x9d\xd9\xab\x2e\xf5\x59\x6d\x1e\x68\x11\x2c\xcf\x07\xde\xa9\x2c\x1b\x4a\xfc\x47\x2c\x81\xc0\x29\xdd\x03\x83\xd8\xc2\x5b\x27\x59\xf6\xcf\x55\x63\x04\x6e\x5e\xb2\x8a\x3e\xa5\x08\x7e\x7f\xd4\x6d\x25\xf7\x03\xa9\x85\xcf\xd2\x87\x0d\x0c\xb6\x0a\x18\xd9\x2b\xe8\x80\x10\x12\x22\x08\x52\x1b\xa6\xc8\xa6\x85\x1c\xad\x51\x37\x37\xba\x44\x9b\xdb\x90\x15\x71\xdc\x1d\xbc\x89\x39\xc3\x4e\x62\x6c\xe5\x7c\x3c\x69\xff\x1b\x00\x00\xff\xff\xb8\xc9\xbe\x1d\x9f\x1b\x00\x00")
var _internal_internal_gs = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xcc\x58\xcd\x6e\x1c\xb9\x11\xbe\xcf\x53\x54\x06\x88\x31\xb3\xd2\x8e\xa4\x3d\x24\xc0\x6a\x7b\x01\xcb\x59\x5b\x58\x78\x6d\x45\x52\x92\x83\x30\x07\x4e\x77\xcd\x0c\xad\x6e\xb2\x4d\xb2\x47\x1a\x09\x03\x04\xc9\x29\xa7\x05\x12\xe4\x01\x02\xe4\x90\x5c\x72\x49\x2e\xb9\xe4\x6d\x6c\x6c\xde\x22\x28\x92\xdd\xcd\x66\xb7\x6c\x39\xb9\x44\x07\xbb\x87\xac\x9f\xaf\xaa\x3e\x16\x7f\x0e\x0e\x40\xa1\xa9\x94\x00\xa6\x14\xdb\x42\x8e\x62\x65\xd6\x23\x2e\x0c\x7d\x4e\x98\xd8\x5e\xcd\x81\x4d\xef\x77\xa3\x51\x2c\x9a\xb2\xd2\xca\xa5\xac\x8c\xe5\x52\x59\x72\xd4\x80\x39\x16\x28\x8c\x86\xa5\x92\x05\x30\xd0\xb2\x52\x29\x7a\x75\x2e\x8c\x04\x06\x19\x6a\xc3\x05\x33\x5c\x7a\xbb\x33\x67\x54\x96\xdb\xc9\x62\x6b\xf0\x6a\x0e\x99\x36\xfb\xe0\xbf\xb5\x4a\x23\x30\x6b\xa6\xd7\xa9\xcc\xd0\xaa\xd1\x0f\x02\x03\xda\x4a\x95\x8a\x0b\x93\xdb\x30\x1a\x70\x4b\xa9\x0a\x66\x34\xb0\x34\x95\x2a\xe3\x62\x05\x16\x87\x1b\x06\x5d\x62\xca\x97\x1c\x15\x30\x91\xc1\x8d\xe2\x06\x35\x09\x68\xc3\x44\xc6\x54\x06\xb2\x32\x65\x65\x66\xce\xf4\x72\xa2\x8d\x22\x13\x4e\x7b\x1f\xc8\xd1\x6c\x36\xfb\x6f\x7c\xb9\x70\x34\x98\x35\x82\x42\x5d\xe5\x86\xe4\x9d\xfd\xd9\xc8\xfb\xd1\x8f\x72\x0b\xb5\xdf\x4a\x5b\x9f\x6b\x84\x0c\x97\xac\xca\x4d\x33\xb3\x94\x0a\xb8\xd1\x20\x4b\x54\x4c\x64\xfa\x51\xe1\x4e\x3a\x7e\x98\xd6\xa8\xcc\x37\x6f\x2b\x96\xbb\x04\x1f\x39\x20\xec\x8b\x96\x06\x1b\x54\xc6\xc7\x40\x66\xa9\x88\x75\x95\x7d\x41\x8d\x3c\xd9\x1a\x7c\x4a\x63\x75\x54\xb6\x76\xad\x7a\xab\xe4\x90\x75\x12\x62\xe4\x85\xfd\xa8\xb9\xb2\x20\xdd\x34\x67\x5a\x83\x9b\x38\xa9\x78\x9e\xa1\xba\x1f\x01\x40\x4d\xa2\x45\xb5\x84\x04\xae\x0e\xe7\xf7\xbb\xe3\x91\x9d\x38\x38\x00\x56\x96\x28\x32\x48\xa5\x30\x28\x6c\x12\x16\xd5\x72\x1f\xb8\xe9\x54\xc6\xad\x0f\x90\x4b\xd0\x56\x91\x48\x67\xd3\xe6\x61\xb4\x21\xd8\xe9\xc0\xa9\xc1\xa2\x84\xa4\x1b\xef\xf4\xb8\x91\x72\xee\x27\xd6\x27\x89\x06\x53\x9e\xe8\xb4\x1e\x83\x99\x9d\xfd\x37\x42\xbf\xf8\x38\xee\xc5\xac\x01\xfe\x2b\x02\x4e\x70\x74\x90\xbe\x41\x44\x8b\x61\x38\x8b\x06\x8b\xfd\x6f\xa5\xe4\xcd\x84\x0c\x8b\xc0\x0c\x5f\xc2\x44\xc0\xd7\x70\x38\x85\x76\xd0\xa3\xbe\x59\xa3\x20\x78\x0a\x81\x6b\x10\xd2\x00\x0a\x59\xad\xd6\xa0\x4b\x96\x12\xe8\xa5\x99\x75\x74\xc8\x18\xf5\x9b\x45\xb5\x9c\xc2\xe7\x0e\x03\x7d\x7e\x05\x22\x36\x1f\xa4\x5e\xe0\xcd\x89\x2b\x79\xad\xb0\x0f\x5f\x7c\x56\xdb\xd9\x13\x96\x07\xb1\xae\xed\x40\x4e\x73\x9f\x52\x3a\xed\x8b\x38\x1e\x39\x99\xee\xec\xae\xf9\xb5\xab\x8b\xe4\x73\xe4\x09\xe2\xe9\x12\xe4\xc9\xa7\xb5\x25\x74\xe3\x72\x37\xda\x8d\x3a\x9c\xd6\xf7\xa1\xa9\x37\x92\x0b\xcf\xbb\xab\xb9\xed\xb9\x7a\xbf\x9e\xd3\x58\x46\xa5\xa0\x0c\x58\x99\x29\x24\x49\xbf\x28\x1e\xc5\x78\xdc\xc6\xb3\xfb\x80\xfe\xd1\x03\xfa\x56\xe2\xea\x70\x3e\x64\x25\x5e\x18\x0b\x1d\x2f\x0b\x0c\xd9\x6f\xf9\x04\x89\xab\xb5\x9e\xc2\x67\x1d\x0c\x9f\x1f\x05\xa2\xd4\xd4\x2c\xff\x78\x72\x78\x0c\x1c\xbe\x82\x56\xf2\x18\xf8\xde\x5e\x8c\xb6\xce\x12\x24\x1e\x31\x9f\x77\xeb\xf8\x20\xc4\x88\x0d\x04\x50\xc0\x5e\x0d\xf2\x83\x61\x77\xfa\x12\xe8\x05\x24\xdd\xa1\x49\xa0\xae\x17\x33\xbb\xa8\x44\x38\xe6\x7b\x3f\x57\xda\x34\xc0\xc3\x54\xeb\xc5\x2c\x6c\x49\x56\x70\xea\x1b\x5d\x6b\xe0\x6a\x0e\x0a\x0b\xc6\x45\x63\xe3\xe8\xcb\x36\x5d\xf3\x4e\x56\xfb\x49\x75\xaa\x3e\xab\x51\x52\xbb\xee\xbb\xd5\x0c\x02\x50\x90\x78\x04\xbd\xb4\x47\x26\xd4\x60\x42\x3d\xd5\xf4\x62\x56\x2f\x26\x1f\xa3\x13\x59\x48\x99\xd3\x79\xe0\x4c\xe1\x92\xdf\x36\x8d\xb9\x59\x1a\xa5\x1d\xef\xf7\xe9\x0f\xd6\xba\x96\x89\x3b\xb9\x37\x76\xdc\x29\x74\xd8\x28\xf5\x14\xbe\xf6\x1c\x2e\xa7\xf0\xe4\x49\xb0\xce\xf5\xd5\xe1\x97\x7e\x62\x6e\x17\x95\x33\x16\xac\xfd\xa6\xbf\x6b\x18\x6f\xc6\xd4\xe2\xa9\xa5\x53\xbf\x97\x4b\x60\x7e\x6f\x1c\xb3\xf1\xc8\xb7\x6c\x7f\x1a\x73\xdb\xf1\x26\x3a\x2f\x7d\x7b\xf1\xfa\x95\xcf\x41\xbd\x89\xd2\x50\xe7\x8c\xe4\x84\xde\x56\xa8\xb6\x70\xc3\xcd\x1a\x4a\x66\xd6\x23\x92\xa0\x89\x17\x68\xea\x74\xbe\xd1\x52\xb4\x19\x65\x66\x6d\x0d\x90\x85\xd3\xcb\xcb\x33\xc8\xf9\x82\xbe\xcf\x51\x97\x52\x68\xb4\xe2\xa3\xe7\xee\x0c\x63\x9d\xba\xa3\x5e\x86\x1d\x1b\xcd\x0f\x12\xf7\x67\x81\x73\xd4\xd6\xc2\xda\x14\x79\x6d\xe1\xf4\xf2\xbb\x97\x1f\xb1\x40\xe2\x75\x4c\x34\x01\x13\x85\x39\x33\x7c\x83\xf6\xa7\x86\x82\x6d\x41\x16\x9c\x4e\xbb\xcc\x1e\xd0\x74\xce\xf4\x7a\x5a\x67\xe6\xe7\x94\x82\x33\x66\xd6\x93\x38\xc6\x26\xa1\x6e\x7f\x75\xab\x71\xc3\xf2\x0a\x6d\x1b\xa2\x31\xc1\x0a\xa4\x03\x45\x51\x4a\x81\xc2\x50\xb1\x68\xd8\xa6\xb5\x39\xc0\x3c\x97\xaa\xf8\x25\xa9\x4d\x86\xf0\x5f\xe3\xf6\x7f\xf4\x76\xf6\xfa\xe2\xb2\xf6\x75\x26\xb5\xf9\x44\x7f\xa0\xf0\x6d\x85\xda\x80\x62\x37\xb0\x90\xd9\xb6\xb6\x75\xee\xc6\x4f\x64\xb6\xed\xe5\xc6\xed\x55\xa7\xc6\x94\xcf\xe8\x34\x75\x6b\x3a\xfb\x15\x89\x39\x72\x47\x14\xf0\x6c\x8d\x1b\x1d\xb1\x00\x12\x27\xbc\x09\xd6\x62\xc8\x23\x67\xc0\x85\x62\x59\x13\x9e\x91\x22\x9e\x38\x37\xd0\xf3\x43\x5c\x81\x04\x36\x3d\x0f\x56\x3f\xf4\x60\x59\x15\x7a\xf0\x16\xde\x36\x6c\x19\x30\x4f\x2d\xa3\xa5\x93\xcd\x55\xef\x4c\x55\x1e\x0f\x1c\x15\x96\x71\xc5\x6c\x91\x62\xf3\x1b\x48\x02\x2e\x39\x9c\x24\xd8\xf3\xb1\x19\xf2\x51\x0e\x31\xe3\x41\x3f\x5d\x1e\x3d\xc2\x97\x6d\x8b\xa1\x3f\x15\xb0\xa7\xef\x83\x78\x06\x49\x87\x62\xc3\xf9\x22\xc1\xb6\x4f\x1e\x1c\xc0\x09\xa7\x9b\x94\xac\x0c\x8e\xd6\xc6\x94\xa7\x4c\x64\x79\x13\x4f\x81\x66\x2d\xb3\xa8\x51\x2c\x2b\x91\xc2\x24\xe0\xea\x14\xd6\x56\xcb\xc3\xa2\xc6\xe1\x6f\x91\x63\xd2\x48\xc6\x7b\x01\x96\x40\x0f\x52\x73\x0b\x49\x38\x52\x6f\xe4\xce\xde\x24\x35\xb7\xd3\x63\x07\xf3\xbc\x12\x40\xf8\x40\xa3\xda\xa0\x9a\x59\xb0\xe7\x55\x7d\x8c\x03\x96\x65\xaa\x5e\x87\x17\x5b\x6d\xb0\x00\xa9\x81\x95\x7c\xd4\xec\xdd\x2f\xd0\xbc\xbe\x78\xaa\x56\x7a\x42\x82\x5e\xef\x99\x2c\x0a\x26\xb2\xda\x0c\xb5\x84\x26\x5c\xba\xb7\xa9\x15\x09\xdb\x63\xff\x73\xde\x26\x66\xc9\x73\x7c\x15\xca\xda\xce\xb2\x6f\x8f\x5e\x25\xaa\x82\x94\xce\xb1\x90\x9b\x9e\x46\xe0\xfb\x05\x9a\x9b\x6c\xd2\xf4\x7f\xdd\x81\xed\x4f\xaf\x76\xec\xbe\xb9\x72\xbd\x40\x63\x05\xd4\x4a\xcf\x02\x76\x5c\xcd\x61\x15\x44\x17\x17\x3d\x88\x7c\x60\x0d\xa6\x8f\x48\x41\x6c\xb1\x4e\x9b\x13\x26\x91\xd0\x30\xed\xbe\xc6\xa0\x30\x5c\x8a\x2f\x6d\x3e\xe8\xb2\xe2\x2e\xd5\x29\x2f\x58\x6e\xa5\x6e\x3e\x3d\xa9\x0d\x8c\xb6\x20\xad\x92\x97\xb6\x92\x11\x1a\x65\x4b\xa1\x83\xae\x4f\x6a\x23\x17\xd0\x70\x95\x1a\x57\xbe\x8c\xcd\x4c\xcf\xb4\xdb\x64\x18\x28\x29\x0d\x66\x6e\xd3\x24\x27\x90\x4a\xa5\xec\x3e\x5e\xbf\x63\x90\xfb\xb4\x52\x8a\x36\x9b\x8c\x2b\x4c\x8d\xa4\x7d\x2d\xa8\xc5\xca\x53\x62\xa0\x82\x34\xde\x3d\xe1\xfc\x8c\x19\x0c\xb8\xf4\xcc\x59\xbe\xe4\x45\x13\x8e\xb9\x6b\x72\x99\xb3\xad\xac\x8c\x25\x1b\xe5\xf3\x17\xa2\x3d\xe1\x99\xbb\x60\x0f\x22\xa3\x64\xe2\x3e\x82\xf5\x38\xeb\x03\xb8\x43\x45\xd2\xf0\xa2\x61\x1a\x09\x50\x15\x01\x8a\x2d\x59\xc0\xe6\x2e\x4a\xc1\x33\x59\x94\x3c\x47\x15\xac\x74\xc8\xaa\xa2\x7c\x7a\x71\x39\x69\xe8\x9d\x85\x8b\x8e\x66\x2f\xb6\xc5\x42\xe6\xb1\x80\x4f\xc0\x37\xc2\xa8\xad\x73\x4f\xfb\xde\x35\x6e\xf7\x2d\xb3\x9c\x63\x3b\x0b\x02\x6f\x4d\xf0\xdb\x9e\x04\xaf\xfd\x3e\xb9\x5f\xcb\x04\x31\x5c\xe3\x36\xb9\x6e\x7b\xb1\xb5\x97\x04\xdb\x26\xd9\x4b\x44\x1b\x9a\x43\xf2\x1d\x2b\xef\x5b\x27\x57\x73\x30\x6c\x91\x23\x5d\xca\x8f\x7e\xd2\x5c\xc0\x29\x77\x9a\xdf\x61\x72\xe8\xcf\xf2\x65\xe5\x5e\x9d\x08\xb8\x43\x44\xde\x02\x30\x07\x07\x60\x64\x26\x21\x55\x52\x6b\xb9\x41\xf5\x2d\x47\x78\xff\xbb\xbf\xbe\xfb\xdb\x3f\x83\x7b\xeb\x84\x30\x27\xe3\xf1\x74\xe8\xb6\x3a\x78\xd5\xf5\x8f\x89\x94\x4e\x48\xdc\xbb\x62\x77\x8b\xb3\x57\x22\x3f\x65\xa5\x7e\xec\x5e\x68\x28\xaa\x29\xb4\x72\x2e\x7f\x64\xc4\x4e\x75\xee\x3a\x74\xa1\x46\xf8\x51\x02\x82\xe7\x11\x34\xa7\x66\xb0\x28\xdd\x57\x02\xd8\xbd\x23\xd9\xcb\x6e\x3b\xef\x8d\x0c\x3c\x82\xd8\x93\x8f\xa3\xed\x29\xd3\xeb\x3a\x9a\x46\x75\xd6\x8d\x2b\xc4\xd6\x51\x0b\x42\x7d\xf2\x84\x0a\x42\x43\x5d\x2b\x7d\xe7\xf4\xd7\xca\x38\xaa\x40\xc0\xc0\xf8\x2f\xae\x48\xbf\x32\x3d\xab\x10\xa2\x68\xb9\x3c\xac\x59\xd7\x00\x12\x4f\x76\x4b\x2c\xdf\x6c\x31\xbe\xa8\xf2\x3b\xdc\xdb\x0b\x6e\xce\x3b\xc0\x5c\x63\xff\x1d\xeb\xdd\xf7\xbf\xf9\xe1\xd7\xbf\x85\x37\xd9\xf5\xd1\xec\xa7\xf0\xef\x3f\xfc\xeb\x87\x3f\xfd\xe5\xdd\x9f\xff\xf1\xfe\xfb\xdf\xbf\xff\xfb\x1f\x3f\xee\xdf\xb9\xa7\xf2\x0d\xfb\x6f\x43\x09\x8f\x6e\xb4\x1a\x56\xd8\x2c\x8f\xce\x3b\xcf\xff\x29\xdf\x2d\x67\xd1\x16\x69\x98\xf5\x0f\x70\x15\x07\x38\x4a\xfc\xf4\x24\xb4\xd3\x44\xca\x07\xf8\x3a\xc0\xcb\xfa\x9d\x6a\x36\xc0\xc5\x2e\x63\x28\x12\x8c\x78\xd5\x7d\x12\x0b\x20\x76\x56\x49\xb0\x4c\x70\x60\x79\x3c\x04\x61\x37\xc0\x31\x2f\x2b\x78\x1e\x83\xf0\x64\xa0\xc4\xad\xd0\x5c\xf0\x3b\x1c\xd8\x70\x89\x48\xc1\x56\x43\x7b\xcd\x4b\x2e\xae\x31\x7b\xc9\xb5\xf1\xfd\xd9\x0d\xbc\x92\x19\xb6\xdb\x45\x80\xac\x9d\x0e\xf6\x8b\x76\x70\x12\x5f\xde\xdc\xe5\xb4\x73\x9d\xb2\x65\x4f\xda\x20\xda\xbd\xa1\x05\x73\x1f\x3b\xb3\x57\x5d\xda\x67\xb5\x79\x60\x8b\x60\x59\xd6\xf3\x4e\x65\xd9\x50\xe2\x3f\x61\x09\x04\x4e\xe9\x1e\x18\xc4\x16\xde\x3a\xc9\xb2\x7f\x7a\x1b\x22\x70\xfd\x2a\x97\x77\x29\x45\xf0\xbb\xa3\xae\x95\xdc\xf7\xa4\x66\x3e\x4b\x1f\x37\xd0\x6b\x15\x30\xd0\x2b\xe8\x80\x10\x12\x22\x08\x52\x1b\xa6\xc8\xa6\x85\x1c\xad\x51\x37\x37\xb8\x44\xeb\xdb\x90\x15\x71\xdc\xed\xbd\xef\x39\xc3\x4e\x62\x68\xe5\x7c\x3a\x69\xff\x13\x00\x00\xff\xff\xf0\xc4\x37\xff\xa8\x1c\x00\x00")

func internal_internal_gs() ([]byte, error) {
return bindata_read(
Expand Down
9 changes: 9 additions & 0 deletions internal/internal.gs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ class StringBuilder{
}

class Strings{
// concatenates the elements of its first argument to create a single string. The separator
// string sep is placed between elements in the resulting string.
string join(string[] elems, string sep){
if (len(elems) == 0) {
return "";
Expand Down Expand Up @@ -90,6 +92,13 @@ class Strings{
return sb.String();

}

// tests whether the string s begins with prefix.
bool hasPrefix(string s, string prefix){
byte[] bs = toByteArray(s);
byte[] bp = toByteArray(prefix);
return len(bs) >= len(bp) && toString(bs[0:len(bp)]) == prefix;
}
}

// appends "v" to the end of a array "a"
Expand Down
5 changes: 4 additions & 1 deletion visitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ func (v *Visitor) VisitVariableDeclarator(ctx *parser.VariableDeclaratorContext)
}
// 数组赋值校验
if leftValue.GetVariable().IsArray() && leftValue.GetVariable().GetType() != sym.Any {
if reflect.TypeOf(ret).Kind() != reflect.Slice {
if ret != nil && reflect.TypeOf(ret).Kind() != reflect.Slice {
// int[] a=10;
log.RuntimePanic(ctx, fmt.Sprintf("cannot use %v as type %s[]", ret, leftValue.GetVariable().GetType().GetName()))
}
Expand Down Expand Up @@ -479,6 +479,9 @@ func (v *Visitor) VisitExpr(ctx *parser.ExprContext) interface{} {
case []interface{}:
list := variable.GetValue().([]interface{})
return list[startIndex:endIndex]
case []byte:
list := variable.GetValue().([]byte)
return list[startIndex:endIndex]
}

return nil
Expand Down

0 comments on commit 214169e

Please sign in to comment.