MCPcopy
hub / github.com/vuejs/core / parse

Method parse

packages/compiler-core/src/tokenizer.ts:944–1093  ·  view source on GitHub ↗

* Iterates through the buffer, calling the function corresponding to the current state. * * States that are more likely to be hit are higher up, as a performance improvement.

(input: string)

Source from the content-addressed store, hash-verified

942 * States that are more likely to be hit are higher up, as a performance improvement.
943 */
944 public parse(input: string): void {
945 this.buffer = input
946 while (this.index < this.buffer.length) {
947 const c = this.buffer.charCodeAt(this.index)
948 if (c === CharCodes.NewLine && this.state !== State.InEntity) {
949 this.newlines.push(this.index)
950 }
951 switch (this.state) {
952 case State.Text: {
953 this.stateText(c)
954 break
955 }
956 case State.InterpolationOpen: {
957 this.stateInterpolationOpen(c)
958 break
959 }
960 case State.Interpolation: {
961 this.stateInterpolation(c)
962 break
963 }
964 case State.InterpolationClose: {
965 this.stateInterpolationClose(c)
966 break
967 }
968 case State.SpecialStartSequence: {
969 this.stateSpecialStartSequence(c)
970 break
971 }
972 case State.InRCDATA: {
973 this.stateInRCDATA(c)
974 break
975 }
976 case State.CDATASequence: {
977 this.stateCDATASequence(c)
978 break
979 }
980 case State.InAttrValueDq: {
981 this.stateInAttrValueDoubleQuotes(c)
982 break
983 }
984 case State.InAttrName: {
985 this.stateInAttrName(c)
986 break
987 }
988 case State.InDirName: {
989 this.stateInDirName(c)
990 break
991 }
992 case State.InDirArg: {
993 this.stateInDirArg(c)
994 break
995 }
996 case State.InDirDynamicArg: {
997 this.stateInDynamicDirArg(c)
998 break
999 }
1000 case State.InDirModifier: {
1001 this.stateInDirModifier(c)

Callers

nothing calls this directly

Calls 15

stateTextMethod · 0.95
stateInterpolationMethod · 0.95
stateInRCDATAMethod · 0.95
stateCDATASequenceMethod · 0.95
stateInAttrNameMethod · 0.95
stateInDirNameMethod · 0.95
stateInDirArgMethod · 0.95
stateInDynamicDirArgMethod · 0.95

Tested by

no test coverage detected