MCPcopy Create free account
hub / github.com/carlos8f/node-relations / parse_Preposition

Function parse_Preposition

parser.js:1891–1975  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1889 }
1890
1891 function parse_Preposition() {
1892 var result0, result1;
1893 var pos0;
1894
1895 reportFailures++;
1896 pos0 = pos;
1897 if (input.charCodeAt(pos) === 32) {
1898 result0 = " ";
1899 pos++;
1900 } else {
1901 result0 = null;
1902 if (reportFailures === 0) {
1903 matchFailed("\" \"");
1904 }
1905 }
1906 if (result0 !== null) {
1907 if (input.substr(pos, 2).toLowerCase() === "of") {
1908 result1 = input.substr(pos, 2);
1909 pos += 2;
1910 } else {
1911 result1 = null;
1912 if (reportFailures === 0) {
1913 matchFailed("\"of\"");
1914 }
1915 }
1916 if (result1 === null) {
1917 if (input.substr(pos, 2).toLowerCase() === "to") {
1918 result1 = input.substr(pos, 2);
1919 pos += 2;
1920 } else {
1921 result1 = null;
1922 if (reportFailures === 0) {
1923 matchFailed("\"to\"");
1924 }
1925 }
1926 if (result1 === null) {
1927 if (input.substr(pos, 4).toLowerCase() === "from") {
1928 result1 = input.substr(pos, 4);
1929 pos += 4;
1930 } else {
1931 result1 = null;
1932 if (reportFailures === 0) {
1933 matchFailed("\"from\"");
1934 }
1935 }
1936 if (result1 === null) {
1937 if (input.substr(pos, 2).toLowerCase() === "in") {
1938 result1 = input.substr(pos, 2);
1939 pos += 2;
1940 } else {
1941 result1 = null;
1942 if (reportFailures === 0) {
1943 matchFailed("\"in\"");
1944 }
1945 }
1946 if (result1 === null) {
1947 if (input.substr(pos, 4).toLowerCase() === "with") {
1948 result1 = input.substr(pos, 4);

Callers 9

parse_DeclarationFunction · 0.85
parse_RevocationFunction · 0.85
parse_VerbQuestionFunction · 0.85
parse_RoleQuestionFunction · 0.85
parse_VerbRequestFunction · 0.85
parse_RoleRequestFunction · 0.85
parse_VerbSubjectRequestFunction · 0.85
parse_RoleSubjectRequestFunction · 0.85
parse_ObjectVerbRequestFunction · 0.85

Calls 1

matchFailedFunction · 0.85

Tested by

no test coverage detected