30 lines
926 B
Plaintext
30 lines
926 B
Plaintext
|
{2}# -*- coding: utf-8 -*-{0}
|
||
|
|
||
|
{2}# single character strings{0}
|
||
|
{11}puts{0} {4}?a{0}
|
||
|
{11}puts{0} {4}?\n{0}
|
||
|
{11}puts{0} {4}?\s{0}
|
||
|
{11}puts{0} {4}?\\{2}#{0}
|
||
|
{11}puts{0} {4}?\u{10}{{4}41{10}}{0}
|
||
|
{11}puts{0} {4}?\C-a{0}
|
||
|
{11}puts{0} {4}?\M-a{0}
|
||
|
{11}puts{0} {4}?\M-\C-a{0}
|
||
|
{11}puts{0} {4}?\C-\M-a{0}
|
||
|
{11}puts{0} {4}?あ{0}
|
||
|
{11}puts{0} {4}?"{0}
|
||
|
{11}puts{0} {4}?/{0}
|
||
|
{11}puts{0} {4}?[{10}[{4}1{10},{0} {4}2{10}]{0}
|
||
|
{11}puts{0} {4}?/{0}\
|
||
|
|
||
|
{2}# symbol and ternary operator{0}
|
||
|
{11}ab{0} {10}={0} {12}/\d+/{0}
|
||
|
{11}cd{0} {10}={0} {12}/\w+/{0}
|
||
|
{11}puts{0} {14}:ab{10},{0} {14}:cd{10},{0} {14}:/{10},{0} {14}:[]{0}
|
||
|
{11}puts{0} {14}:/{0}\
|
||
|
|
||
|
{2}# TODO: space after '?' and ':' is not needed{0}
|
||
|
{11}puts{0} {5}true{0} {10}?{11}ab{0} {10}:{0} {11}cd{0}
|
||
|
{11}puts{0} {5}true{0} {10}?{0} {12}/\d+/{0} {10}:{0} {12}/\w+/{0}
|
||
|
{11}puts{0} {5}false{0} {10}?{11}ab{0} {10}:{0} {11}cd{0}
|
||
|
{11}puts{0} {5}false{0} {10}?{0} {12}/\d+/{0} {10}:{0} {12}/\w+/{0}
|