Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4a062c18 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Parse else ifxxx statement" am: 725af86f

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1501162

Change-Id: I6ced61a4bf42739318d80a4cf80463e07a6bb34e
parents 9fffe4cd 725af86f
Loading
Loading
Loading
Loading
+14 −1
Original line number Diff line number Diff line
@@ -212,8 +212,21 @@ func (p *parser) parseDirective() bool {
	expression := SimpleMakeString("", pos)

	switch d {
	case "endif", "endef", "else":
	case "endif", "endef":
		// Nothing
	case "else":
		p.ignoreSpaces()
		if p.tok != '\n' {
			d = p.scanner.TokenText()
			p.accept(scanner.Ident)
			if d == "ifdef" || d == "ifndef" || d == "ifeq" || d == "ifneq" {
				d = "el" + d
				p.ignoreSpaces()
				expression = p.parseExpression()
			} else {
				p.errorf("expected ifdef/ifndef/ifeq/ifneq, found %s", d)
			}
		}
	case "define":
		expression, endPos = p.parseDefine()
	default: